-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from WaniAthar/main
added forgot password screen and button
- Loading branch information
Showing
2 changed files
with
126 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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,87 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:insync/widgets/button.dart'; | ||
import 'package:insync/widgets/input_field.dart'; | ||
|
||
class ForgotPage extends StatefulWidget { | ||
const ForgotPage({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<ForgotPage> createState() => _ForgotPageState(); | ||
} | ||
|
||
class _ForgotPageState extends State<ForgotPage> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(backgroundColor: Colors.transparent,), | ||
body: ListView( | ||
children: [ | ||
Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
const SizedBox( | ||
height: 50, | ||
), | ||
Container( | ||
height: 100, | ||
width: 100, | ||
margin: const EdgeInsets.only(left: 20), | ||
decoration: BoxDecoration( | ||
color: Theme.of(context).primaryColor, | ||
borderRadius: BorderRadius.circular(50), | ||
), | ||
child: const Icon( | ||
Icons.lock_person_rounded, | ||
size: 60, | ||
color: Colors.white, | ||
), | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(20), | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
Container( | ||
padding: const EdgeInsets.only(right: 143), | ||
child: const Text( | ||
"Forgot your Password?", | ||
style: TextStyle( | ||
fontSize: 40, | ||
fontWeight: FontWeight.w700, | ||
fontFamily: "fonts/GeneralSans-Bold.otf"), | ||
), | ||
), | ||
const SizedBox(height: 10), | ||
Container( | ||
padding: const EdgeInsets.only(right: 30), | ||
child: const Text( | ||
"No problem. Just let us know your\nemail address and we'll email you a\npassword reset link that will allow you to reset your passoword.", | ||
textAlign: TextAlign.left, | ||
style: TextStyle( | ||
fontSize: 20, | ||
fontWeight: FontWeight.w400, | ||
color: Colors.black54, | ||
), | ||
), | ||
), | ||
const SizedBox(height: 10), | ||
const InputField( | ||
label: "Email", | ||
placeholder: "[email protected]", | ||
keyboard: TextInputType.emailAddress, | ||
), | ||
const SizedBox(height: 10), | ||
PrimaryButton( | ||
buttonTitle: "Email password reset link", | ||
onPressed: () {}, | ||
), | ||
], | ||
), | ||
), | ||
], | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains 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 |
---|---|---|
|
@@ -6,6 +6,7 @@ import 'package:insync/view/auth/create_account_overlay.dart'; | |
import 'package:insync/widgets/button.dart'; | ||
import 'package:insync/widgets/dividing_or.dart'; | ||
import 'package:insync/widgets/input_field.dart'; | ||
import 'forgot_password.dart'; | ||
|
||
class LoginOverlay extends StatefulWidget { | ||
const LoginOverlay({ | ||
|
@@ -62,17 +63,44 @@ class _LoginOverlayState extends State<LoginOverlay> { | |
), | ||
), | ||
const SizedBox(height: 32), | ||
InputField( | ||
label: "E-mail", | ||
placeholder: "[email protected]", | ||
keyboard: TextInputType.emailAddress, | ||
controller: emailctr, | ||
), | ||
InputField( | ||
label: "Password", | ||
placeholder: "•••••••••••••", | ||
password: true, | ||
controller: passwordctr, | ||
Stack( | ||
children: [ | ||
Column( | ||
children: [ | ||
InputField( | ||
label: "E-mail", | ||
placeholder: "[email protected]", | ||
keyboard: TextInputType.emailAddress, | ||
controller: emailctr, | ||
), | ||
InputField( | ||
label: "Password", | ||
placeholder: "•••••••••••••", | ||
password: true, | ||
controller: passwordctr, | ||
), | ||
], | ||
), | ||
Padding( | ||
padding: const EdgeInsets.only(top: 102, left: 235), | ||
child: GestureDetector( | ||
onTap: () { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute( | ||
builder: (context) => const ForgotPage(), | ||
), | ||
); | ||
}, | ||
child: Text("Forgot password?", | ||
style: TextStyle( | ||
color: Theme.of(context).primaryColor, | ||
fontSize: 15, | ||
fontWeight: FontWeight.w500, | ||
)), | ||
), | ||
) | ||
], | ||
), | ||
const SizedBox(height: 8), | ||
PrimaryButton( | ||
|