This pull request includes several enhancements to the login and signup functionalities, focusing on improving form validation and user experience. The key changes involve adding new state properties, simplifying emit calls, and updating form validation logic.
Enhancements to Login Functionality:
State Management:
Added isAllFieldsFilled property to LoginState to track if all fields are filled. (src/support_sphere/lib/logic/cubit/login_state.dart, [1][2][3]
Modified LoginForm to use MultiBlocListener for handling multiple state changes and to validate all fields. (src/support_sphere/lib/presentation/components/auth/login_form.dart, [1][2]
Updated input fields to set the form as invalid if validation fails. (src/support_sphere/lib/presentation/components/auth/login_form.dart, [1][2]
Adjusted the login button to be enabled only when the form is valid and all fields are filled. (src/support_sphere/lib/presentation/components/auth/login_form.dart, [1][2]
Enhancements to Signup Functionality:
State Management:
Added isAllFieldsFilled property to SignupState to track if all fields are filled. (src/support_sphere/lib/logic/cubit/signup_state.dart, [1][2][3][4][5]
Modified SignupForm to use MultiBlocListener for handling multiple state changes and to validate all fields. (src/support_sphere/lib/presentation/components/auth/signup_form.dart, [1][2]
Updated input fields to set the form as invalid if validation fails. (src/support_sphere/lib/presentation/components/auth/signup_form.dart, [1][2][3][4][5][6][7]
This pull request includes several enhancements to the login and signup functionalities, focusing on improving form validation and user experience. The key changes involve adding new state properties, simplifying
emit
calls, and updating form validation logic.Enhancements to Login Functionality:
State Management:
isAllFieldsFilled
property toLoginState
to track if all fields are filled. (src/support_sphere/lib/logic/cubit/login_state.dart
, [1] [2] [3]LoginCubit
to include methods for validating all fields and checking if the login button should be enabled. (src/support_sphere/lib/logic/cubit/login_cubit.dart
, src/support_sphere/lib/logic/cubit/login_cubit.dartL16-R38)Form Validation:
LoginForm
to useMultiBlocListener
for handling multiple state changes and to validate all fields. (src/support_sphere/lib/presentation/components/auth/login_form.dart
, [1] [2]src/support_sphere/lib/presentation/components/auth/login_form.dart
, [1] [2]src/support_sphere/lib/presentation/components/auth/login_form.dart
, [1] [2]Enhancements to Signup Functionality:
State Management:
isAllFieldsFilled
property toSignupState
to track if all fields are filled. (src/support_sphere/lib/logic/cubit/signup_state.dart
, [1] [2] [3] [4] [5]SignupCubit
to include methods for validating all fields and checking if the signup button should be enabled. (src/support_sphere/lib/logic/cubit/signup_cubit.dart
, src/support_sphere/lib/logic/cubit/signup_cubit.dartL19-R64)Form Validation:
SignupForm
to useMultiBlocListener
for handling multiple state changes and to validate all fields. (src/support_sphere/lib/presentation/components/auth/signup_form.dart
, [1] [2]src/support_sphere/lib/presentation/components/auth/signup_form.dart
, [1] [2] [3] [4] [5] [6] [7]Related Issues
Resolves https://github.com/uw-ssec/post-disaster-comms/issues/90, #131
Duplicate of https://github.com/uw-ssec/post-disaster-comms/pull/130