onError method
Called whenever an error
is thrown in any Bloc
or Cubit
.
The stackTrace
argument may be StackTrace.empty if an error
was received without a stack trace.
Implementation
@override
// ignore: unnecessary_overrides
void onError(BlocBase bloc, Object error, StackTrace stackTrace) {
super.onError(bloc, error, stackTrace);
onBlocError?.call(bloc, error, stackTrace);
}