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
Implementers

Constructors

IBlocSubject()

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 given change. A change occurs when a new state is emitted. onChange is called before the state of the bloc is updated. onChange is a great spot to add logging/analytics for a specific bloc.
setState(State state) → void
Updates the state to the provided state. 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