IBlocSubject<State extends Object?> class
abstract
Interface to observe states stream. Current state available as property. Bloc Subject to implement the Publisher/Subscriber pattern
- Implemented types
-
- IStateObservable<
State>
- IStateObservable<
- Implementers
Constructors
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 → State
-
The current state.
no setterinherited
-
stream
→ StateStream<
State> -
The state stream.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
Change< State> change) → void -
Called whenever a
change
occurs with the givenchange
. Achange
occurs when a newstate
is emitted. onChange is called before thestate
of thebloc
is updated. onChange is a great spot to add logging/analytics for a specificbloc
. -
setState(
State state) → void -
Updates the
state
to the providedstate
. setState does nothing if the instance has been closed. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited