-
Notifications
You must be signed in to change notification settings - Fork 3
Forgot password UI 🖌️ #124
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
Open
TreavVasu
wants to merge
32
commits into
ECellNitrr:main
Choose a base branch
from
TreavVasu:ForgotPasswordUI-🖌️
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
The head ref may contain hidden characters: "ForgotPasswordUI-\u{1F58C}\uFE0F"
Open
Changes from 28 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
41b84dd
.
TreavVasu b808da1
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu 3a9143d
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu cb0215f
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu dc74374
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu 3e1629a
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu 2294b80
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu 2cda41c
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu 8bf760a
Staging Changes
TreavVasu 03efa05
pubspec.lock
TreavVasu 6915e67
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu 6bb18b7
Minor fix
TreavVasu bfdc024
ForgotPassword UI staged
TreavVasu 9ff21c1
Resolved
TreavVasu 97225c8
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu a2b24a6
Merge branch 'main' into ForgotPasswordAPI-🚀
TreavVasu 37173eb
Merge branch 'ForgotPasswordAPI-🚀' of https://github.com/TreavVasu/EC…
TreavVasu 53feaf1
final commit
TreavVasu 1f40f50
Minor fix
TreavVasu 3a828a1
UI build stage1
TreavVasu de50b98
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu 915a550
UI Done
TreavVasu 7df95f3
check fix
TreavVasu 926a104
Minor fix
TreavVasu b53d3f2
Check fix
TreavVasu 5e4a03e
minor fix
TreavVasu 91bfd00
Routes added
TreavVasu f2efeaa
Code Defragmentation
TreavVasu 745d433
UI Fix
TreavVasu 8aee252
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu 97bbf98
Final fix
TreavVasu 0535169
Check fix
TreavVasu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| import 'package:ecellapp/core/res/colors.dart'; | ||
| import 'package:ecellapp/core/res/dimens.dart'; | ||
| import 'package:ecellapp/core/res/strings.dart'; | ||
| import 'package:ecellapp/widgets/email_field.dart'; | ||
| import 'package:ecellapp/widgets/screen_background.dart'; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:google_fonts/google_fonts.dart'; | ||
|
|
||
| import 'cubit/forgot_password_cubit.dart'; | ||
|
|
||
| class AskEmailScreen extends StatelessWidget { | ||
| const AskEmailScreen({Key key, this.onSubmit, this.emailController}) : super(key: key); | ||
|
|
||
| final Function(BuildContext context, ForgotPasswordState state) onSubmit; | ||
| final TextEditingController emailController; | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| final ScrollController scrollController = ScrollController(); | ||
werainkhatri marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| final formKey = GlobalKey<FormState>(); | ||
werainkhatri marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| double width = MediaQuery.of(context).size.width; | ||
| double height = MediaQuery.of(context).size.height; | ||
| double bottom = MediaQuery.of(context).viewInsets.bottom; | ||
| double heightFactor = height / 1000; | ||
| if (scrollController.hasClients) { | ||
| if (bottom > height * 0.25) { | ||
| scrollController.animateTo( | ||
| bottom - height * 0.25, | ||
| duration: Duration(milliseconds: 300), | ||
| curve: Curves.ease, | ||
| ); | ||
| } else { | ||
| scrollController.animateTo(0, duration: Duration(milliseconds: 300), curve: Curves.ease); | ||
| } | ||
| } | ||
| return DefaultTextStyle( | ||
| style: GoogleFonts.roboto().copyWith(color: C.primaryUnHighlightedColor), | ||
| child: Stack( | ||
| children: [ | ||
| ScreenBackground(elementId: 1), | ||
| SingleChildScrollView( | ||
| physics: NeverScrollableScrollPhysics(), | ||
| controller: scrollController, | ||
| child: Container( | ||
| height: height * 1.25, | ||
| child: Column( | ||
| mainAxisSize: MainAxisSize.min, | ||
| children: [ | ||
| Expanded( | ||
| flex: 5, | ||
| child: Container( | ||
| padding: EdgeInsets.fromLTRB(0, heightFactor * 100, 0, 0), | ||
| alignment: Alignment.center, | ||
| child: Text( | ||
| "Step 1/3", | ||
| style: | ||
| TextStyle(fontSize: 35 * heightFactor, fontWeight: FontWeight.w600), | ||
| ), | ||
| )), | ||
| Flexible( | ||
| flex: 7, | ||
| child: Column( | ||
| children: [ | ||
| // Logo | ||
| Container( | ||
| alignment: Alignment.centerLeft, | ||
| padding: EdgeInsets.only(left: D.horizontalPadding + 1), | ||
| child: Image.asset( | ||
| S.assetEcellLogoWhite, | ||
| width: width * 0.25 * heightFactor, | ||
| ), | ||
| ), | ||
| Container( | ||
| alignment: Alignment.centerLeft, | ||
| padding: EdgeInsets.only(left: D.horizontalPadding, top: 20), | ||
| child: Text( | ||
| "Welcome", | ||
| style: | ||
| TextStyle(fontSize: 35 * heightFactor, fontWeight: FontWeight.w600), | ||
| ), | ||
| ), | ||
| //Text Greeting | ||
| Container( | ||
| alignment: Alignment.centerLeft, | ||
| padding: EdgeInsets.only(left: D.horizontalPadding, top: 5), | ||
| child: RichText( | ||
| text: TextSpan( | ||
| children: [ | ||
| TextSpan( | ||
| text: "Forgot your ", | ||
| style: TextStyle( | ||
| color: C.primaryUnHighlightedColor, | ||
| fontWeight: FontWeight.w300)), | ||
| TextSpan( | ||
| text: "Password ", | ||
| style: TextStyle(color: C.primaryHighlightedColor), | ||
| ), | ||
| TextSpan( | ||
| text: "? \n", | ||
| style: TextStyle( | ||
| color: C.primaryUnHighlightedColor, | ||
| fontWeight: FontWeight.w300)), | ||
| TextSpan( | ||
| text: | ||
| "We got you covered.\nJust enter your registered email address.", | ||
| style: TextStyle( | ||
| color: C.primaryUnHighlightedColor, | ||
| fontWeight: FontWeight.w300)), | ||
| ], | ||
| style: TextStyle(fontSize: 25 * heightFactor), | ||
| ), | ||
| ), | ||
| ), | ||
| SizedBox(height: 23 * heightFactor), | ||
| Form( | ||
| key: formKey, | ||
| child: Padding( | ||
| padding: EdgeInsets.symmetric(horizontal: D.horizontalPadding), | ||
| child: Column( | ||
| children: [ | ||
| EmailField(emailController), | ||
| SizedBox(height: 20 * heightFactor), | ||
| SizedBox(height: 10 * heightFactor), | ||
| ], | ||
| ), | ||
| )), | ||
werainkhatri marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ], | ||
| ), | ||
| ), | ||
| //LoginButton | ||
| Expanded( | ||
| child: Container( | ||
| padding: EdgeInsets.only(right: D.horizontalPadding), | ||
| alignment: Alignment.topRight, | ||
| child: Container( | ||
| decoration: BoxDecoration( | ||
| borderRadius: BorderRadius.all(Radius.circular(30)), | ||
| boxShadow: [ | ||
| BoxShadow( | ||
| color: C.authButtonColor.withOpacity(0.2), | ||
| blurRadius: 10, | ||
| spreadRadius: 3, | ||
| offset: Offset(0, 12), | ||
| ) | ||
| ], | ||
| ), | ||
| child: RaisedButton( | ||
| shape: RoundedRectangleBorder( | ||
| borderRadius: BorderRadius.all(Radius.circular(30)), | ||
| ), | ||
| color: C.authButtonColor, | ||
| onPressed: () => onSubmit, | ||
werainkhatri marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| child: Container( | ||
| height: 60, | ||
| width: 120, | ||
| alignment: Alignment.center, | ||
| child: Text( | ||
| "Submit", | ||
| style: TextStyle( | ||
| color: C.primaryUnHighlightedColor, fontSize: 20 * heightFactor), | ||
| ), | ||
| ), | ||
| ), | ||
| ), | ||
| ), | ||
| ), | ||
| //To flex background | ||
| Expanded(flex: 9, child: Container()), | ||
| ], | ||
| ), | ||
| ), | ||
| ), | ||
| ], | ||
| ), | ||
| ); | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.