Consumer<T> class

Consumer

Consumer is like react.Consumer

Consumer is only one at project; it's single class. Consumer have getState, and setState. setState is trigger all stream listen, update state and call all Consumer widget update. build is use _ConsumerWidget create a StatefulWidget, and subscribe consumer at _ConsumerWidget.

Constructors

Consumer(T state)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → T
final
stream Stream
getter/setter pair

Methods

build(Widget builder(BuildContext ctx, T state), {required List memo(T s)}) Widget
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setState(dynamic fn(T state)) → dynamic
toString() String
A string representation of this object.
inherited

Operators

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