property_change_notifier library

Classes

MultiPropertyChangeProvider
Provides an alternative to nesting multiple PropertyChangeProvider widgets by declaring them all at once in a single list with a single child.
PropertyChangeConsumer<T extends PropertyChangeNotifier<S>, S extends Object>
A widget-based listener for cases where a BuildContext is hard to access, or if you prefer this kind of API. To register the widget to be rebuilt only on specific property changes, provide a properties parameter. The type parameter T is the type of the PropertyChangeNotifier subclass. The type parameter S is the type of the properties to observe.
PropertyChangeModel<T extends PropertyChangeNotifier<S>, S extends Object>
The InheritedModel subclass that is rebuilt by _PropertyChangeProviderState whenever its PropertyChangeNotifier is updated. Notifies dependents when the names of the changed properties intersect with the list of properties provided to the PropertyChangeProvider.of method. The type parameter T is the type of the PropertyChangeNotifier<S> subclass. The type parameter S is the type of the properties to observe.
PropertyChangeNotifier<T extends Object>
A backwards-compatible implementation of ChangeNotifier that allows implementers to provide more granular information to listeners about what specific property was changed. This lets listeners be much more efficient when responding to model changes. Any number of listeners can subscribe to any number of properties.
PropertyChangeProvider<T extends PropertyChangeNotifier<S>, S extends Object>
An InheritedWidget that provides access to a PropertyChangeNotifier to descendant widgets. The type parameter T is the type of the PropertyChangeNotifier<S> subclass. The type parameter S is the type of the properties to observe.
PropertyChangeProviderState<T extends PropertyChangeNotifier<S>, S extends Object>
The companion State object to PropertyChangeProvider. For private use only. Subscribes as a global listener to the PropertyChangeNotifier instance at widget.value. Rebuilds whenever a property is changed and creates a new PropertyChangeModel with a reference to itself so it can access the original model instance and changed property names.

Typedefs

PropertyCallback<T> = void Function(T?)
Signature of callbacks that have 1 argument and return no data.
PropertyChangeBuilder<T, S> = Widget Function(BuildContext, T?, Set<S>?)
StringPropertyChangeConsumer<T extends PropertyChangeNotifier<String>> = PropertyChangeConsumer<T, String>
A convenience typedef to use in the common use case where property names are of type String.
StringPropertyChangeNotifier = PropertyChangeNotifier<String>
A convenience typedef to use in the common use case where property names are of type String.
StringPropertyChangeProvider<T extends PropertyChangeNotifier<String>> = PropertyChangeProvider<T, String>
A convenience typedef to use in the common use case where property names are of type String.