RtScope
The RtScope
widget serves as an entry point for Reactter, allowing you to use any consumer(such as RtConsumer
, RtSelector
, RtComponent
, BuildContext.watch
, BuildContext.select
) to observe state changes within the subtree of the widget it wraps, without the need to explicitly define dependencies.
Syntax
Properties
key
: An optionalKey
to use for identifying the widget.child
: TheWidget
that is to be wrapped by theRtScope
widget.
Usage
In the following example, we have a simple counter application that uses the RtScope
widget to listen to the state changes of the count
value.