Files
syncrow-app/lib/utils/bloc_observer.dart
Mohammad Salameh 9cc479ba17 Refactor email and password validation logic in LoginForm widget
Update email and password validation logic in the LoginForm widget to only
perform validation when the state is not AuthTokenError. This ensures that
validation is skipped when there is an authentication token error.
2024-04-02 18:09:23 +03:00

30 lines
706 B
Dart

// ignore_for_file: avoid_print
import 'package:flutter_bloc/flutter_bloc.dart';
class MyBlocObserver extends BlocObserver {
@override
void onCreate(BlocBase bloc) {
super.onCreate(bloc);
print('onCreate -- ${bloc.runtimeType}');
}
@override
void onChange(BlocBase bloc, Change change) {
super.onChange(bloc, change);
print('onChange -- ${bloc.runtimeType}, $change');
}
@override
void onError(BlocBase bloc, Object error, StackTrace stackTrace) {
print('onError -- ${bloc.runtimeType}, $error');
super.onError(bloc, error, stackTrace);
}
@override
void onClose(BlocBase bloc) {
print('onClose -- ${bloc.runtimeType}');
super.onClose(bloc);
}
}