Forgot password UI 🖌️#124
Open
TreavVasu wants to merge 32 commits intoECellNitrr:mainfrom
Hidden character warning
The head ref may contain hidden characters: "ForgotPasswordUI-\ud83d\udd8c\ufe0f"
Open
Conversation
…o ForgotPasswordAPI-🚀
Collaborator
Author
|
Currently: Defragmentation of code. |
Collaborator
Author
|
@werainkhatri Currently the states do not wait for each other they just redirect from one another. Giving no time for Entering email or top and showing error afterward! Can you describe what is the problem here? |
werainkhatri
requested changes
Mar 12, 2021
Member
werainkhatri
left a comment
There was a problem hiding this comment.
Some changes. More required. Test the code, fix other bugs and I'll review later.
- Code improvement
replace lines 44-119 with the code below
body: Stack(
children: [
ScreenBackground(elementId: 0),
BlocConsumer(
listener: (context, state) {
if (state is ForgotPasswordError) {
Scaffold.of(context).showSnackBar(
SnackBar(content: Text(state.message)),
);
}
},
builder: (context, state) {
if (state is ForgotLoading)
return _buildLoading(context);
else if (state is ForgotPasswordError)
return _stepScreen(context, state.state);
else if (state is ForgotResetSuccess)
return _passwordResetSuccess();
else
return _stepScreen(context, state);
},
),
],
),
);
}
Widget _stepScreen(BuildContext context, ForgotPasswordState state) {
if (state is ForgotEmailInitial)
return AskEmailScreen(
emailController: emailController,
onSubmit: () => _sendOTP(context, state),
);
else if (state is ForgotOTPInitial)
return EnterOTPScreen(
numSelected: _onNumSelected,
otp: otpEntered,
toVerify: () => _verifyOtp(context, state),
);
else if (state is ForgotResetInitial)
return ResetPassword(
onConfirm: () => _changePassword(context, state),
confirmPasswordController: confirmPasswordController,
passwordController: passwordController,
);
else
return AskEmailScreen(
emailController: emailController,
onSubmit: () => _sendOTP(context, state),
);
}
- Add scroll feature (when user opens keyboard, screen scrolls, as in loginscreen)
- Update the delayed duration in FakeRepository to 1s.
…o ForgotPasswordUI-🖌️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #18
Description
#18
Type of Change: (Delete irrelevant options)
Code/Quality Assurance Only (Delete irrelevant options)
How Has This Been Tested?
Describe the tests you ran to verify your changes. Provide instructions or GIFs so we can reproduce. List any relevant details for your test.
Checklist:
Code/Quality Assurance
Mention the dependencies/packages/plugins that have been added (if any)