-
Notifications
You must be signed in to change notification settings - Fork 0
/
Simple.dart
120 lines (113 loc) · 3.37 KB
/
Simple.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import 'package:fluix/Authentication/SimpleS.dart';
import 'package:fluix/Components/Raisedbtn.dart';
import 'package:fluix/Components/TextField.dart';
import 'package:fluix/Utils/Theme.dart';
import 'package:flutter/material.dart';
/*
/*TODO: PLEASE MAKE SURE TO IMPORT ALL THE PACKAGES & FILES AS SHOWN ABOVE YOU CAN REPLACE THE DEMO SCREENS WITH YOUR SCREEN*/
*/
class Simple extends StatefulWidget {
static final String path = "lib/Authentication/Simple.dart";
@override
_SimpleState createState() => _SimpleState();
}
class _SimpleState extends State<Simple> {
FocusNode usernameFN, passwordFN;
String username, password;
@override
void initState() {
usernameFN = FocusNode();
passwordFN = FocusNode();
super.initState();
}
@override
void dispose() {
usernameFN.dispose();
passwordFN.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Padding(
padding: const EdgeInsets.only(left: 10, right: 10),
child: ListView(
children: <Widget>[
SizedBox(
height: 20,
),
Image.asset("images/logo.png", height: 200),
SizedBox(
height: 10,
),
Center(
child: Text(
"Welcome back!",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 30),
)),
SizedBox(
height: 10,
),
Center(
child: Text(
"Log in to your existant account of FLUIX",
style: TextStyle(color: Colors.grey),
)),
SizedBox(
height: 60,
),
GestureDetector(
onTap: () {
FocusScope.of(context).requestFocus(usernameFN);
},
child: kTextField(
"Username", Icon(Icons.person), usernameFN, username),
),
SizedBox(
height: 20,
),
GestureDetector(
onTap: () {
FocusScope.of(context).requestFocus(passwordFN);
},
child: kTextField(
"Password", Icon(Icons.vpn_key), passwordFN, password),
),
SizedBox(
height: 25,
),
kRaisedButton(150, "LOG IN", () {}),
SizedBox(
height: 40,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"Don't have an account? ",
),
GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(SimpleS.path);
},
child: Text(
"Sign Up",
style: TextStyle(
color: enableDarkMode ? Colors.teal : Colors.blue, fontWeight: FontWeight.w600),
),
),
],
),
SizedBox(
height: 20,
),
],
),
),
),
);
}
}