NotifierBuilder<T extends Listenable> class

Builds a subtree when notifier publishes a change.

The builder receives the original, typed notifier and a context belonging to this widget. Additional context.listen or context.scope calls inside the builder also rebuild this widget, rather than its parent.

Subscriptions follow the sources used by each build and are removed when this widget unmounts. The source remains owned by its caller and is never disposed by this widget. Any Listenable is supported, including Notifier, ValueNotifier, animations, and custom subscription sources.

Inheritance
Available extensions

Constructors

NotifierBuilder({Key? key, required T notifier, required Widget builder(BuildContext context, T notifier)})
const

Properties

builder → Widget Function(BuildContext context, T notifier)
Builds from the current state of notifier whenever it notifies.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
finalinherited
notifier → T
The model or other subscription source to observe.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

animate({Duration? duration, Curve? curve, Object? trigger, bool repeat = false}) → Animate

Available on Widget, provided by the AnimateExtension extension

Starts an Animate chain over this widget. duration / curve apply to the whole chain. With no trigger it plays on mount; with a non-null trigger it rests on mount and replays whenever the token changes.
build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates the Element that will mount this widget into the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited