state_watcher library

Classes

BuildStore
Represents a store to within a build method.
Computed<T>
A bit of state that is derived from other states.
Disposable
Interface for components that need to release resources before they are removed from the store where they are stored.
Provided<T>
A bit of state provided by the developper, that can be read from and written to.
Ref<T>
Represents the reference of a bit of state.
StateObserver
Interface for observing state changes.
StateStore
A widget that creates a new Store.
WatcherBuilder
A widget which rebuilds its builder when the states associated to the refs observed in it, changes
WatcherEffect<T>
Listen to the changes of ref and call onStateChanged when the state changes.
WatcherStatefulWidget
A StatefulWidget which can be used to watch the changes of Refs.
WatcherStatelessWidget
A StatelessWidget which can be used to watch the changes of Refs.

Mixins

StateLogic
Mixin to apply in order to separate the logic from the view.

Extensions

WatcherStatefulStateExtension on State<T>
Extensions for States of WatcherStatefulWidgets.

Typedefs

AreDifferent<T> = bool Function(T a, T b)
Signature for determining whether a and b are different.
StateChanged<T> = void Function(BuildContext context, T oldState, T newState)
Signature for a function when a state changes.
Updater<T> = T Function(T oldValue)
Signature for updating a state.
WatcherWidgetBuilder = Widget Function(BuildContext context, BuildStore store)
Signature for a function to build a widget when the state changes.