Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parvatijay2901/update signup_and_login_botton_color #130

Conversation

parvatijay2901
Copy link
Contributor

@parvatijay2901 parvatijay2901 commented Oct 17, 2024

Added isAllFieldsFilled property and a checkAllFieldsFilled function to the SignupState and LoginState classes to make sure the app can check if all the required fields are completed.

Further, added a section to check if isAllFieldsFilled and isValid are true => have the login button / signup button as "blue"/primary color, else, by default it is grey.

Issue #90

errorMessage: errorMessage ?? this.errorMessage,
showPassword: showPassword ?? this.showPassword,
);
}

// Check if all fields are filled
bool checkAllFieldsFilled() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is more of a business logic and I think it is best practice to place this within the cubit instead of the state. The logic would be that this check should run against the current state. You'd need some sort of event that emits a change in this isAllFieldsFilled.

  1. You can use a bloclistener (https://bloclibrary.dev/flutter-bloc-concepts/) on the login form / signup form to check what the current state is
  2. From there you can either modify the state by emitting an event or simply keeping track of just the button state within the widget

anujsinha3 and others added 6 commits October 21, 2024 21:37
* test: setup CI and framework for unit tests

* style: update dummy test

* test: authService signUp codes tests

* test: add build_runner for mocking test classes in CI testing

* ci: run workflow only for frontend changes

* docs: add description for test group and setup
@nikiburggraf nikiburggraf linked an issue Oct 23, 2024 that may be closed by this pull request
@parvatijay2901
Copy link
Contributor Author

parvatijay2901 commented Oct 25, 2024

MultiBlocListener reference: felangel/bloc#3155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

style: Update Login and Signup button default styling
3 participants