ISpectLoggerBloc extension

Trace helpers for BLoC / Cubit lifecycle events.

These are typically emitted by the ispectify_bloc observer - call them directly only when instrumenting a custom BlocObserver.

on

Methods

blocClose({required String source, required String target, Map<String, Object?>? meta, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerBloc extension

Logs onClose under stateCategory with the bloc-close key.
blocCreate({required String source, required String target, Map<String, Object?>? meta, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerBloc extension

Logs onCreate under stateCategory with the bloc-create key.
blocDone({required String source, required String target, bool hasError = false, Object? error, StackTrace? errorStackTrace, Map<String, Object?>? meta, String? correlationId, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerBloc extension

Logs onDone under stateCategory with the bloc-done key.
blocError({required String source, required String target, required Object error, StackTrace? errorStackTrace, Map<String, Object?>? meta, String? correlationId, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerBloc extension

Logs onError under stateCategory with the bloc-error key.
blocEvent({required String source, required String target, Map<String, Object?>? meta, String? correlationId, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerBloc extension

Logs onEvent under stateCategory with the bloc-event key.
blocState({required String source, required String target, Map<String, Object?>? meta, String? correlationId, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerBloc extension

Logs onChange under stateCategory with the bloc-state key.
blocTransition({required String source, required String target, Map<String, Object?>? meta, String? correlationId, ISpectTraceConfig? config, String? consoleMessage}) → void

Available on ISpectLogger, provided by the ISpectLoggerBloc extension

Logs onTransition under stateCategory with the bloc-transition key.