ISpectifyBlocObserver class
BLoC logger on ISpectify base
iSpectify field is the current ISpectify instance.
Provide your instance if your application uses ISpectify as the default logger
Common ISpectify instance will be used by default
Constructors
-
ISpectifyBlocObserver({ISpectify? iSpectify, ISpectifyBlocSettings settings = const ISpectifyBlocSettings(), void onBlocEvent(Bloc bloc, Object? event)?, void onBlocTransition(Bloc bloc, Transition transition)?, void onBlocChange(BlocBase bloc, Change change)?, void onBlocError(BlocBase bloc, Object error, StackTrace stackTrace)?, void onBlocCreate(BlocBase bloc)?, void onBlocClose(BlocBase bloc)?, List<
String> filters = const []})
Properties
-
filters
→ List<
String> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onBlocChange → void Function(BlocBase bloc, Change change)?
-
final
- onBlocClose → void Function(BlocBase bloc)?
-
final
- onBlocCreate → void Function(BlocBase bloc)?
-
final
- onBlocError → void Function(BlocBase bloc, Object error, StackTrace stackTrace)?
-
final
- onBlocEvent → void Function(Bloc bloc, Object? event)?
-
final
- onBlocTransition → void Function(Bloc bloc, Transition transition)?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings → ISpectifyBlocSettings
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
BlocBase bloc, Change change) → void -
Called whenever a
Changeoccurs in anyblocAchangeoccurs when a new state is emitted. onChange is called before a bloc's state has been updated. -
onClose(
BlocBase bloc) → void -
Called whenever a
Blocis closed. onClose is called just before theBlocis closed and indicates that the particular instance will no longer emit new states. -
onCreate(
BlocBase bloc) → void -
Called whenever a
Blocis instantiated. In many cases, a cubit may be lazily instantiated and onCreate can be used to observe exactly when the cubit instance is created. -
onDone(
Bloc bloc, Object? event, [Object? error, StackTrace? stackTrace]) → void -
Called whenever an
eventhandler for a specificblochas completed. This may include anerrorandstackTraceif an uncaught exception occurred within the event handler.inherited -
onError(
BlocBase bloc, Object error, StackTrace stackTrace) → void -
Called whenever an
erroris thrown in anyBlocorCubit. ThestackTraceargument may be StackTrace.empty if an error was received without a stack trace. -
onEvent(
Bloc bloc, Object? event) → void -
Called whenever an
eventisaddedto anyblocwith the givenblocandevent. -
onTransition(
Bloc bloc, Transition transition) → void -
Called whenever a transition occurs in any
blocwith the givenblocandtransition. Atransitionoccurs when a neweventis added and a new state isemittedfrom 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