-
Notifications
You must be signed in to change notification settings - Fork 0
/
LoginForm.dart
72 lines (69 loc) · 2.34 KB
/
LoginForm.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
// ignore_for_file: avoid_print, prefer_const_constructors
import 'package:flutter/material.dart';
import 'package:widgets/Components/MyButton.dart';
import 'package:widgets/Components/MyTextField.dart';
import 'package:widgets/Components/SquareTile.dart';
class LoginPageUI extends StatelessWidget {
final userNameController = TextEditingController();
final passwordController = TextEditingController();
void onTapPrint() {
print("Pressed");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Login Page")),
body: SingleChildScrollView(
child: Center(
child: Column(
children: [
//size bod
const SizedBox(height: 50),
const Icon(
Icons.lock,
size: 100,
),
const SizedBox(height: 50),
//gretting message here
const Text("Welcome to our Login Panel",
style: TextStyle(color: Colors.grey, fontSize: 18)),
const SizedBox(height: 25),
//input text field
MyTextField(
controller: userNameController,
hintText: "username or email",
obscureText: false),
const SizedBox(
height: 25,
),
MyTextField(
controller: passwordController,
hintText: "password",
obscureText: true),
//add some space
SizedBox(height: 25),
//sign in button
MyButton(onTapFunction: onTapPrint, buttonText: "Sign In"),
SizedBox(
height: 25,
),
//add divider
Divider(
thickness: 2,
color: Colors.grey[200],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SquareTile(imagePath: 'lib/images/google.png'),
SizedBox(
width: 10,
),
SquareTile(imagePath: 'lib/images/facebook.png'),
],
),
],
),
)));
}
}