FlutterBlocMonitorDelegate class
Delegate that handles all the storing of the user bloc events, transitions and errors
Constructors
- FlutterBlocMonitorDelegate({dynamic onErrorFunc(BlocBase bloc, Object error, StackTrace stackTrace)?, dynamic onEventFunc(Bloc bloc, Object? event)?, dynamic onTransitionFunc(Bloc bloc, Transition transition)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onErrorFunc → dynamic Function(BlocBase bloc, Object error, StackTrace stackTrace)?
-
Callback to be executed when error occurs
final
- onEventFunc → dynamic Function(Bloc bloc, Object? event)?
-
Callback to be executed when event occurs
final
- onTransitionFunc → dynamic Function(Bloc bloc, Transition transition)?
-
Callback to be executed when transition occurs
final
- 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(
BlocBase 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.inherited -
onClose(
BlocBase bloc) → void -
Called whenever a
Bloc
is closed.onClose
is called just before theBloc
is closed and indicates that the particular instance will no longer emit new states.inherited -
onCreate(
BlocBase bloc) → void -
Called whenever a
Bloc
is instantiated. In many cases, a cubit may be lazily instantiated andonCreate
can be used to observe exactly when the cubit instance is created.inherited -
onError(
BlocBase bloc, Object error, StackTrace stackTrace) → void -
Called whenever an
error
is thrown in anyBloc
orCubit
. ThestackTrace
argument may be StackTrace.empty if an error was received without a stack trace. -
onEvent(
Bloc bloc, Object? event) → void -
Called whenever an
event
isadded
to anybloc
with the givenbloc
andevent
. -
onTransition(
Bloc bloc, Transition transition) → void -
Called whenever a transition occurs in any
bloc
with the givenbloc
andtransition
. Atransition
occurs when a newevent
is added and a new state isemitted
from a correspondingEventHandler
. 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
Static Properties
-
errors
→ List<
ErrorInfo> -
final
-
events
→ List<
EventInfo> -
final
-
transitions
→ List<
TransitionInfo> -
final