Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
medapp_eksad
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
qorri_di
medapp_eksad
Commits
d1c211a5
Commit
d1c211a5
authored
Sep 30, 2022
by
rizky ramadhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
login
parent
97acc590
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
24 deletions
+47
-24
login.dart
lib/login.dart
+47
-24
No files found.
lib/login.dart
View file @
d1c211a5
...
@@ -42,7 +42,6 @@ class _SignInState extends State<SignIn> {
...
@@ -42,7 +42,6 @@ class _SignInState extends State<SignIn> {
return
Scaffold
(
return
Scaffold
(
body:
Stack
(
body:
Stack
(
children:
[
children:
[
Container
(
Container
(
decoration:
const
BoxDecoration
(
decoration:
const
BoxDecoration
(
image:
DecorationImage
(
image:
DecorationImage
(
...
@@ -57,7 +56,6 @@ class _SignInState extends State<SignIn> {
...
@@ -57,7 +56,6 @@ class _SignInState extends State<SignIn> {
bottom:
screenSize
.
height
*
0.13
),
bottom:
screenSize
.
height
*
0.13
),
child:
Stack
(
child:
Stack
(
children:
[
children:
[
Container
(
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
const
Color
.
fromARGB
(
255
,
10
,
116
,
255
),
color:
const
Color
.
fromARGB
(
255
,
10
,
116
,
255
),
...
@@ -71,7 +69,8 @@ class _SignInState extends State<SignIn> {
...
@@ -71,7 +69,8 @@ class _SignInState extends State<SignIn> {
),
),
Padding
(
Padding
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
screenSize
.
width
*
0.33
,
top:
screenSize
.
height
*
0.07
),
left:
screenSize
.
width
*
0.33
,
top:
screenSize
.
height
*
0.07
),
child:
Container
(
child:
Container
(
width:
screenSize
.
width
*
0.3
,
width:
screenSize
.
width
*
0.3
,
height:
screenSize
.
height
*
0.6
,
height:
screenSize
.
height
*
0.6
,
...
@@ -106,8 +105,8 @@ class _SignInState extends State<SignIn> {
...
@@ -106,8 +105,8 @@ class _SignInState extends State<SignIn> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Container
(
Container
(
padding:
padding:
EdgeInsets
.
only
(
EdgeInsets
.
only
(
left:
screenSize
.
width
*
0.055
),
left:
screenSize
.
width
*
0.055
),
height:
screenSize
.
width
*
0.02
,
height:
screenSize
.
width
*
0.02
,
child:
Image
.
asset
(
"assets/logo/medapp-logo.png"
),
child:
Image
.
asset
(
"assets/logo/medapp-logo.png"
),
),
),
...
@@ -136,8 +135,15 @@ class _SignInState extends State<SignIn> {
...
@@ -136,8 +135,15 @@ class _SignInState extends State<SignIn> {
child:
TextFormField
(
child:
TextFormField
(
controller:
emailController
,
controller:
emailController
,
textAlign:
TextAlign
.
start
,
textAlign:
TextAlign
.
start
,
onFieldSubmitted:
(
String
value
){
onFieldSubmitted:
(
String
value
)
{
if
(
emailController
.
value
.
text
==
'admin@admin.com'
&&
passwordController
.
value
.
text
==
'administrator'
)
{
Navigator
.
pushNamed
(
context
,
'/dashboard'
);
}
else
{
loginUser
();
loginUser
();
}
},
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
labelText:
"Enter Your Email"
,
labelText:
"Enter Your Email"
,
...
@@ -183,8 +189,15 @@ class _SignInState extends State<SignIn> {
...
@@ -183,8 +189,15 @@ class _SignInState extends State<SignIn> {
width:
screenSize
.
width
*
0.2
,
width:
screenSize
.
width
*
0.2
,
child:
TextFormField
(
child:
TextFormField
(
controller:
passwordController
,
controller:
passwordController
,
onFieldSubmitted:
(
String
value
){
onFieldSubmitted:
(
String
value
)
{
if
(
emailController
.
value
.
text
==
'admin@admin.com'
&&
passwordController
.
value
.
text
==
'administrator'
)
{
Navigator
.
pushNamed
(
context
,
'/dashboard'
);
}
else
{
loginUser
();
loginUser
();
}
},
},
textAlign:
TextAlign
.
start
,
textAlign:
TextAlign
.
start
,
obscureText:
_isObscure
,
obscureText:
_isObscure
,
...
@@ -224,10 +237,15 @@ class _SignInState extends State<SignIn> {
...
@@ -224,10 +237,15 @@ class _SignInState extends State<SignIn> {
crossAxisAlignment:
CrossAxisAlignment
.
end
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
mainAxisAlignment:
MainAxisAlignment
.
end
,
mainAxisAlignment:
MainAxisAlignment
.
end
,
children:
[
children:
[
TextButton
(
onPressed:
(){
TextButton
(
Navigator
.
pushNamed
(
context
,
'/reset_password'
);
onPressed:
()
{
},
child:
Text
(
'Forgot Password?'
)),
Navigator
.
pushNamed
(
SizedBox
(
width:
52
,)
context
,
'/reset_password'
);
},
child:
Text
(
'Forgot Password?'
)),
SizedBox
(
width:
52
,
)
],
],
),
),
const
Spacer
(
const
Spacer
(
...
@@ -240,10 +258,13 @@ class _SignInState extends State<SignIn> {
...
@@ -240,10 +258,13 @@ class _SignInState extends State<SignIn> {
width:
screenSize
.
width
*
0.08
,
width:
screenSize
.
width
*
0.08
,
child:
ElevatedButton
(
child:
ElevatedButton
(
onPressed:
()
{
onPressed:
()
{
if
(
emailController
.
value
.
text
==
'admin@admin.com'
&&
if
(
emailController
.
value
.
text
==
passwordController
.
value
.
text
==
'administrator'
)
{
'admin@admin.com'
&&
Navigator
.
pushNamed
(
context
,
'/dashboard'
);
passwordController
.
value
.
text
==
}
else
{
'administrator'
)
{
Navigator
.
pushNamed
(
context
,
'/dashboard'
);
}
else
{
loginUser
();
loginUser
();
}
}
// if (emailController.value.text == emailController &&
// if (emailController.value.text == emailController &&
...
@@ -321,9 +342,11 @@ class _SignInState extends State<SignIn> {
...
@@ -321,9 +342,11 @@ class _SignInState extends State<SignIn> {
),
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
all
(
21.0
),
padding:
const
EdgeInsets
.
all
(
21.0
),
child:
ElevatedButton
(
onPressed:
(){
child:
ElevatedButton
(
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'/'
);
Navigator
.
pushNamed
(
context
,
'/'
);
},
child:
Icon
(
Icons
.
arrow_back
)),
},
child:
Icon
(
Icons
.
arrow_back
)),
),
),
],
],
),
),
...
...
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