diff --git a/lib/application/auth/login_form/login_form_bloc.dart b/lib/application/auth/login_form/login_form_bloc.dart index 2c51083..abded69 100644 --- a/lib/application/auth/login_form/login_form_bloc.dart +++ b/lib/application/auth/login_form/login_form_bloc.dart @@ -23,10 +23,10 @@ class LoginFormBloc extends Bloc { ) { return event.map( emailChanged: (e) async { - emit(state.copyWith(email: e.email)); + emit(state.copyWith(email: e.email, failureOrAuthOption: none())); }, passwordChanged: (e) async { - emit(state.copyWith(password: e.password)); + emit(state.copyWith(password: e.password, failureOrAuthOption: none())); }, submitted: (e) async { Either? failureOrAuth; diff --git a/lib/application/user/user_edit_form/user_edit_form_bloc.dart b/lib/application/user/user_edit_form/user_edit_form_bloc.dart index 1727089..b62f52d 100644 --- a/lib/application/user/user_edit_form/user_edit_form_bloc.dart +++ b/lib/application/user/user_edit_form/user_edit_form_bloc.dart @@ -22,7 +22,7 @@ class UserEditFormBloc extends Bloc { ) { return event.map( nameChanged: (e) async { - emit(state.copyWith(name: e.name)); + emit(state.copyWith(name: e.name, failureOrUserOption: none())); }, submitted: (e) async { Either? failureOrUser; diff --git a/lib/presentation/pages/profile/pages/profile_change_password/profile_change_password_page.dart b/lib/presentation/pages/profile/pages/profile_change_password/profile_change_password_page.dart index b227813..b6c975f 100644 --- a/lib/presentation/pages/profile/pages/profile_change_password/profile_change_password_page.dart +++ b/lib/presentation/pages/profile/pages/profile_change_password/profile_change_password_page.dart @@ -30,6 +30,8 @@ class _ProfileChangePasswordPageState extends State { @override Widget build(BuildContext context) { return BlocListener( + listenWhen: (p, c) => + p.failureOrChangePasswordOption != c.failureOrChangePasswordOption, listener: (context, state) { state.failureOrChangePasswordOption.fold( () => null,