onError method
- BlocBase bloc,
- Object error,
- StackTrace stackTrace
override
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
void onError(BlocBase<dynamic> bloc, Object error, StackTrace stackTrace) {
if (kDebugMode) {
print("===== Error Start: =====");
print("$bloc\n$error\n$stackTrace");
print("===== Error End: =====");
}
super.onError(bloc, error, stackTrace);
}