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

Forgot password UI 🖌️ #124

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
41b84dd
.
TreavVasu Jan 20, 2021
b808da1
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Jan 20, 2021
3a9143d
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Feb 5, 2021
cb0215f
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Feb 9, 2021
dc74374
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Feb 12, 2021
3e1629a
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Feb 16, 2021
2294b80
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Feb 21, 2021
2cda41c
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Feb 27, 2021
8bf760a
Staging Changes
TreavVasu Mar 4, 2021
03efa05
pubspec.lock
TreavVasu Mar 4, 2021
6915e67
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Mar 4, 2021
6bb18b7
Minor fix
TreavVasu Mar 5, 2021
bfdc024
ForgotPassword UI staged
TreavVasu Mar 5, 2021
9ff21c1
Resolved
TreavVasu Mar 5, 2021
97225c8
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Mar 5, 2021
a2b24a6
Merge branch 'main' into ForgotPasswordAPI-🚀
TreavVasu Mar 6, 2021
37173eb
Merge branch 'ForgotPasswordAPI-🚀' of https://github.com/TreavVasu/EC…
TreavVasu Mar 6, 2021
53feaf1
final commit
TreavVasu Mar 6, 2021
1f40f50
Minor fix
TreavVasu Mar 7, 2021
3a828a1
UI build stage1
TreavVasu Mar 11, 2021
de50b98
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Mar 11, 2021
915a550
UI Done
TreavVasu Mar 11, 2021
7df95f3
check fix
TreavVasu Mar 11, 2021
926a104
Minor fix
TreavVasu Mar 11, 2021
b53d3f2
Check fix
TreavVasu Mar 11, 2021
5e4a03e
minor fix
TreavVasu Mar 11, 2021
91bfd00
Routes added
TreavVasu Mar 11, 2021
f2efeaa
Code Defragmentation
TreavVasu Mar 11, 2021
745d433
UI Fix
TreavVasu Mar 13, 2021
8aee252
Merge branch 'main' of https://github.com/ECellNitrr/ECellApp2021 int…
TreavVasu Mar 13, 2021
97bbf98
Final fix
TreavVasu Mar 13, 2021
0535169
Check fix
TreavVasu Mar 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/core/res/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ class C {
//Speaker Card fonts
static final Color cardFontColor = HexColor("#A3A3A3");

///Otp ring colors
static final Color firstRing = HexColor("#2DEBFF");
static final Color secondRing = HexColor("#FB28E6");
static final Color thirdRing = HexColor("#EFEA79");
static final Color fourthRing = HexColor("#AE82FF");
//BQuiz Gradient Colors
static final Color bQuizGradient1 = HexColor("#ffc158");
static final Color bQuizGradient2 = HexColor("#dd19ad");
Expand Down
1 change: 1 addition & 0 deletions lib/core/res/strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class S {
static const routeEvents = "/events";
static const routeSponsors = "/sponsors";
static const routeEsummit = "/esummit";
static const routeForgotPassword = "/forgotPassword";
static const routeTeam = "/team";
static const routeAboutUs = "/about_us";
static const routeBQuiz = "/bquiz";
Expand Down
7 changes: 7 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'package:ecellapp/screens/forgot_password/cubit/forgot_password_cubit.dart';
import 'package:ecellapp/screens/forgot_password/forgot_password.dart';
import 'package:ecellapp/screens/forgot_password/forgot_password_repository.dart';
import 'package:ecellapp/screens/b_quiz/bquiz.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -63,6 +66,10 @@ class ECellApp extends StatelessWidget {
S.routeSponsors: (_) => BlocProvider(
create: (_) => SponsorsCubit(APISponsorsRepository()), child: SponsorsScreen()),
S.routeEsummit: (_) => ESummitScreen(),
S.routeForgotPassword: (_) => BlocProvider(
create: (_) => ForgotPasswordCubit(FakeForgotPasswordRepository()),
child: ForgotPasswordScreen(),
),
S.routeBQuiz: (_) => BQuiz(),
S.routeAboutUs: (_) =>
BlocProvider(create: (_) => TeamCubit(FakeTeamRepository()), child: AboutUsScreen()),
Expand Down
178 changes: 178 additions & 0 deletions lib/screens/forgot_password/ask_email.dart
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;
werainkhatri marked this conversation as resolved.
Show resolved Hide resolved
final TextEditingController emailController;

@override
Widget build(BuildContext context) {
final ScrollController scrollController = ScrollController();
werainkhatri marked this conversation as resolved.
Show resolved Hide resolved
final formKey = GlobalKey<FormState>();
werainkhatri marked this conversation as resolved.
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.
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.
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()),
],
),
),
),
],
),
);
}
}
Loading