NotifierImpl class

Implementation of Notifier.

Uses Stream as primary way to communicate broadcasts. Callbacks are wrapped inside a StreamBuilder which is returned from build method of a StatefulWidget. Whenever notify is called, the stream is notified for changes, so all the StreamBuilder's connected to that stream are rebuilt thus fetching new data.

Every operation is added to a queue of work using Lock from 'synchronized' package.

Implemented types

Constructors

NotifierImpl()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

dispose() → void
Dispose any resources that are open.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notify<T>(String action, T data) → void
Send data as broadcasts to listeners registered with action.
override
register<T>(String action, Widget callback(NotifierData<T>)) Widget
Register a new callback on action.
override
toString() String
Returns a string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) Notifier
override