ChangeEmitter<C extends Change> class abstract

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.
no setter
hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Whether this has been disposed.
no setter
parent ChangeEmitter<Change>?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addChangeToStream(C change) → void
Used by subclasses to broadcast Changes.
didRegisterParent() → void
Will be called after parent is set and the ancestor tree is available.
dispose() → void
Disposes resources and closes the stream controller.
findAncestorOfExactType<T extends ChangeEmitter<Change>>() → T?
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