ChangeNotifier<C extends ChangeRecord> class Null safety

Supplies changes and various hooks to implement Observable.

May use notifyChange to queue a change record; they are asynchronously delivered at the end of the VM turn.

ChangeNotifier may be extended, mixed in, or used as a delegate.

Implemented types

Constructors

ChangeNotifier()

Properties

changes Stream<List<C>>
Emits a list of changes when the state of the object changes. [...]
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
hasObservers bool
Whether changes has at least one active listener. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

deliverChanges() bool
If hasObservers, synchronously emits changes that have been queued. [...]
@mustCallSuper, override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notifyChange([C? change]) → void
Schedules change to be delivered. [...]
override
observed() → void
May override to be notified when changes is first observed.
@mustCallSuper, override
toString() String
A string representation of this object. [...]
inherited
unobserved() → void
May override to be notified when changes is no longer observed.
@mustCallSuper, override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited