Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
debugs
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KLUGLUG
debugs
Commits
11728631
Commit
11728631
authored
Apr 27, 2019
by
susheel chebrolu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
16ae2c37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
0 deletions
+87
-0
Hostel Management System/source code/login_page.dart
Hostel Management System/source code/login_page.dart
+87
-0
No files found.
Hostel Management System/source code/login_page.dart
0 → 100644
View file @
11728631
import
'package:flutter/material.dart'
;
import
'home_page.dart'
;
class
LoginPage
extends
StatefulWidget
{
static
String
tag
=
'login-page'
;
@override
_LoginPageState
createState
()
=>
new
_LoginPageState
();
}
class
_LoginPageState
extends
State
<
LoginPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
final
logo
=
Hero
(
tag:
'hero'
,
child:
CircleAvatar
(
backgroundColor:
Colors
.
transparent
,
radius:
48.0
,
child:
Image
.
asset
(
'assets/flutter.png'
),
),
);
final
email
=
TextFormField
(
keyboardType:
TextInputType
.
emailAddress
,
autofocus:
false
,
initialValue:
''
,
decoration:
InputDecoration
(
hintText:
'Email'
,
contentPadding:
EdgeInsets
.
fromLTRB
(
20.0
,
10.0
,
20.0
,
10.0
),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
32.0
)),
),
);
final
password
=
TextFormField
(
autofocus:
false
,
initialValue:
''
,
obscureText:
true
,
decoration:
InputDecoration
(
hintText:
'Password'
,
contentPadding:
EdgeInsets
.
fromLTRB
(
20.0
,
10.0
,
20.0
,
10.0
),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
32.0
)),
),
);
final
loginButton
=
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
16.0
),
child:
RaisedButton
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
24
),
),
onPressed:
()
{
Navigator
.
of
(
context
).
pushNamed
(
HomePage
.
tag
);
},
padding:
EdgeInsets
.
all
(
12
),
color:
Colors
.
lightBlueAccent
,
child:
Text
(
'Log In'
,
style:
TextStyle
(
color:
Colors
.
white
)),
),
);
final
forgotLabel
=
FlatButton
(
child:
Text
(
'Forgot password?'
,
style:
TextStyle
(
color:
Colors
.
black54
),
),
onPressed:
()
{},
);
return
Scaffold
(
backgroundColor:
Colors
.
white
,
body:
Center
(
child:
ListView
(
shrinkWrap:
true
,
padding:
EdgeInsets
.
only
(
left:
24.0
,
right:
24.0
),
children:
<
Widget
>[
logo
,
SizedBox
(
height:
48.0
),
email
,
SizedBox
(
height:
8.0
),
password
,
SizedBox
(
height:
24.0
),
loginButton
,
forgotLabel
],
),
),
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment