ChangeEmitter<C extends Change> class

An alternative to ChangeNotifier from the Flutter framework that exposes a stream of Changes to notify widgets and other components of your state that they should update instead of a list of callbacks. This allows ChangeEmitters to provide extra information about individual changes and makes them more easily composable.

For more information on how to compose ChangeEmitters, see EmitterContainer.

This library also comes with wigdets to use with the Provider package to provide and consume state for your app. See ChangeEmitterProvider and ChangeEmitterSelector.

Implementers

Constructors

ChangeEmitter({bool useSyncronousStream = false})

Properties

changes Stream<C>
The stream of Changes to notify your UI or other state elements that they should update.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
isDisposed bool
Whether this has been disposed.
read-only
parent ChangeEmitter<Change>
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addChangeToStream(C change) → void
Used by subclasses to broadcast Changes.
dispose() → void
Disposes resources and closes the stream controller.
findAncestorOfExactType<T extends ChangeEmitter<Change>>() → T
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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