This pull request introduces several enhancements to the login and signup functionality. The changes focus on improving form validation, adding new state properties, and optimizing the UI components for better user experience.
Enhancements to Form Validation and State Management:
src/support_sphere/lib/logic/cubit/login_cubit.dart: Simplified the emailChanged and passwordChanged methods, added validateAllFieldsFilled, and introduced isLoginButtonEnabled to ensure all fields are filled before enabling the login button.
src/support_sphere/lib/logic/cubit/signup_cubit.dart: Simplified field change methods, added validateAllFieldsFilled, and introduced isSignupButtonEnabled to ensure all fields are filled before enabling the signup button.
This pull request introduces several enhancements to the login and signup functionality. The changes focus on improving form validation, adding new state properties, and optimizing the UI components for better user experience.
Enhancements to Form Validation and State Management:
src/support_sphere/lib/logic/cubit/login_cubit.dart
: Simplified theemailChanged
andpasswordChanged
methods, addedvalidateAllFieldsFilled
, and introducedisLoginButtonEnabled
to ensure all fields are filled before enabling the login button.src/support_sphere/lib/logic/cubit/login_state.dart
: Added a new state propertyisAllFieldsFilled
to track if all form fields are filled. Updated thecopyWith
method andprops
list accordingly. [1] [2] [3]Enhancements to Signup Functionality:
src/support_sphere/lib/logic/cubit/signup_cubit.dart
: Simplified field change methods, addedvalidateAllFieldsFilled
, and introducedisSignupButtonEnabled
to ensure all fields are filled before enabling the signup button.src/support_sphere/lib/logic/cubit/signup_state.dart
: Added a new state propertyisAllFieldsFilled
to track if all form fields are filled. Updated thecopyWith
method andprops
list accordingly. [1] [2] [3] [4] [5]UI Component Improvements:
src/support_sphere/lib/presentation/components/auth/login_form.dart
: ChangedBlocListener
toMultiBlocListener
for better state management, added form validation listeners, and updated button states based on form validation. [1] [2] [3] [4] [5] [6]src/support_sphere/lib/presentation/components/auth/signup_form.dart
: ChangedBlocListener
toMultiBlocListener
for better state management, added form validation listeners, and updated button states based on form validation. [1] [2] [3] [4] [5] [6] [7] [8]Related Issues
Resolves #90
Duplicate of #130