IsolateBlocObserver class abstract
An interface for observing the behavior of IsolateBloc and IsolateCubit instances.
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
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
IsolateBlocBase bloc, Change change) → void -
Called whenever a
Change
occurs in anybloc
Achange
occurs when a new state is emitted. onChange is called before a bloc's state has been updated. -
onClose(
IsolateBlocBase bloc) → void - Called whenever a IsolateBlocBase is closed. onClose is called just before the bloc is closed and indicates that the particular instance will no longer emit new states.
-
onCreate(
IsolateBlocBase bloc) → void - Called whenever a IsolateBlocBase is instantiated. In many cases, a bloc may be lazily instantiated and onCreate can be used to observe exactly when the bloc instance is created.
-
onError(
IsolateBlocBase bloc, Object error, StackTrace stackTrace) → void -
Called whenever an
error
is thrown in any IsolateBloc or IsolateCubit. ThestackTrace
argument may be StackTrace.empty if an error was received without a stack trace. -
onEvent(
IsolateBlocBase bloc, Object? event) → void -
Called whenever an
event
isadded
to anybloc
with the givenbloc
andevent
. -
onTransition(
IsolateBloc bloc, Transition transition) → void -
Called whenever a transition occurs in any
bloc
with the givenbloc
andtransition
. Atransition
occurs when a newevent
isadded
andmapEventToState
executed. onTransition is called before abloc
's state has been updated. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited