-
Notifications
You must be signed in to change notification settings - Fork 1
/
forget_dart.dart
75 lines (71 loc) · 1.88 KB
/
forget_dart.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import 'package:flutter/material.dart';
import 'login_page.dart';
class ForgetPage extends StatefulWidget {
static String tag = 'forget-page';
@override
_ForgetPageState createState() => _ForgetPageState();
}
class _ForgetPageState extends State<ForgetPage> {
@override
Widget build(BuildContext context) {
final email = TextFormField
(
keyboardType: TextInputType.emailAddress,
autofocus: false,
decoration: InputDecoration
(
hintText: 'Email',
contentPadding: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 10.0),
border: OutlineInputBorder
(
borderRadius: BorderRadius.circular(32.0)
),
),
);
final resetButton = Padding
(
padding: EdgeInsets.symmetric(vertical: 16.0),
child: Material
(
borderRadius: BorderRadius.circular(30.0),
shadowColor: Colors.lightBlueAccent.shade100,
elevation: 5.0,
child: MaterialButton
(
minWidth: 200.0,
height: 42.0,
onPressed: (){
Navigator.of(context).pushNamed(LoginPage.tag);
},
color: Colors.lightBlueAccent,
child: Text('Reset', style: TextStyle(color: Colors.white),),
),
),
);
final hint = Padding
(
padding: EdgeInsets.all(18.0),
child: Text('Enter your email address to reset your password'),
);
return Scaffold
(
// the building of the scaffold
backgroundColor: Colors.white,
body: Center
(
child: ListView
(
shrinkWrap: true,
padding: EdgeInsets.only(left: 24.0,right:24.0),
children: <Widget>
[
hint,
email,
SizedBox(height: 8.0,),
resetButton
],
),
),
);
}
}