Skip to content

Commit

Permalink
Merge pull request #58 from WaniAthar/main
Browse files Browse the repository at this point in the history
added forgot password screen and button
  • Loading branch information
hayat-tamboli authored Oct 2, 2022
2 parents bc6522a + 23f2eb3 commit 3d25e30
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 11 deletions.
87 changes: 87 additions & 0 deletions lib/view/auth/forgot_password.dart
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: () {},
),
],
),
),
],
),
],
),
);
}
}
50 changes: 39 additions & 11 deletions lib/view/auth/login_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 3d25e30

Please sign in to comment.