Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
Tour Travel Agency AGR
Project
Project
Details
Activity
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
Dio Maulana
Tour Travel Agency AGR
Commits
f2067cff
Commit
f2067cff
authored
May 24, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add responsive web
parent
b0dd22fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
223 additions
and
203 deletions
+223
-203
forgot_password.dart
lib/page/forgot_password/forgot_password.dart
+114
-101
reset_password.dart
lib/page/reset_password/reset_password.dart
+109
-102
No files found.
lib/page/forgot_password/forgot_password.dart
View file @
f2067cff
...
...
@@ -4,8 +4,10 @@ import 'package:flutter/material.dart';
import
'package:tour_travel_agr/helper/components_widget/custom_appbar.dart'
;
import
'package:tour_travel_agr/helper/components_widget/widget_button.dart'
;
import
'package:tour_travel_agr/helper/components_widget/widget_text_field.dart'
;
import
'package:tour_travel_agr/helper/widget_responsive.dart'
;
import
'package:tour_travel_agr/resource/assets.dart'
;
import
'package:tour_travel_agr/resource/colors.dart'
;
import
'package:tour_travel_agr/resource/routes.dart'
;
import
'package:tour_travel_agr/resource/size.dart'
;
import
'package:tour_travel_agr/resource/style.dart'
;
...
...
@@ -35,119 +37,130 @@ class _ForgotPasswordViewState extends State<ForgotPasswordView> {
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
backgroundColor:
ColorManager
.
backgroundColor
,
body:
Stack
(
children:
[
Positioned
(
top:
0
,
left:
0
,
child:
Image
(
height:
100
,
image:
AssetImage
(
Assets
.
elipse
,
),
body:
ScreenResponsive
(
widget:
bodyWidget
(
context
),
widthScreen:
MediaQuery
.
of
(
context
).
size
.
width
,
),
);
}
Stack
bodyWidget
(
BuildContext
context
)
{
return
Stack
(
children:
[
Positioned
(
top:
0
,
left:
0
,
child:
Image
(
height:
100
,
image:
AssetImage
(
Assets
.
elipse
,
),
),
Container
(
padding:
EdgeInsets
.
only
(
top:
AppPadding
.
safeAreaTop
(
context
),
left:
AppPadding
.
p20
,
righ
t:
AppPadding
.
p20
,
bottom:
AppPadding
.
safeAreaBot
(
context
)
,
),
child:
Column
(
children:
[
const
CustomAppBar
(
text:
"ForgotPassword"
,
)
,
Expanded
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
child:
Cent
er
(
child:
Image
(
width:
216
,
height
:
216
,
image:
AssetImage
(
Assets
.
forgotPassword
,
)
,
),
Container
(
padding:
EdgeInsets
.
only
(
top:
AppPadding
.
safeAreaTop
(
context
)
,
lef
t:
AppPadding
.
p20
,
right:
AppPadding
.
p20
,
bottom:
AppPadding
.
safeAreaBot
(
context
),
),
child:
Column
(
children:
[
const
CustomAppBar
(
text:
"ForgotPassword"
,
),
Expanded
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Contain
er
(
child:
Center
(
child:
Image
(
width
:
216
,
height:
216
,
image:
AssetImage
(
Assets
.
forgotPassword
,
),
),
),
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m25
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"Forgot"
,
style:
getSemiBoldStyle
(
color:
Colors
.
black
,
fontSize:
32
,
),
),
Text
(
"Password"
,
style:
getSemiBoldStyle
(
color:
Colors
.
black
,
fontSize:
32
,
),
)
],
),
),
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m25
,
),
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m12
,
),
child:
Text
(
"Dont worry! It happens. Please enter your number phone"
,
style:
getMediumStyle
(
color:
ColorManager
.
grey
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"Forgot"
,
style:
getSemiBoldStyle
(
color:
Colors
.
black
,
fontSize:
32
,
),
),
),
),
SizedBox
(
height:
AppMargin
.
m20
,
Text
(
"Password"
,
style:
getSemiBoldStyle
(
color:
Colors
.
black
,
fontSize:
32
,
),
)
],
),
InputTextField
(
controller:
whatsappController
,
labelText:
"No Whatsapp"
,
inputType:
TextInputType
.
number
,
onChanged:
(
val
)
{
if
(
val
.
length
>
7
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
setState
(()
{
buttonActive
=
false
;
});
}
},
),
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m12
,
),
SizedBox
(
height:
AppMargin
.
m20
,
child:
Text
(
"Dont worry! It happens. Please enter your number phone"
,
style:
getMediumStyle
(
color:
ColorManager
.
grey
,
),
),
CustomButton
(
text:
"Submit"
,
colorButton:
(!
buttonActive
)
?
Colors
.
grey
:
null
,
onTap:
()
{
// TODO: dosomething here
},
)
],
),
),
SizedBox
(
height:
AppMargin
.
m20
,
),
InputTextField
(
controller:
whatsappController
,
labelText:
"No Whatsapp"
,
inputType:
TextInputType
.
number
,
onChanged:
(
val
)
{
if
(
val
.
length
>
7
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
setState
(()
{
buttonActive
=
false
;
});
}
},
),
SizedBox
(
height:
AppMargin
.
m20
,
),
CustomButton
(
text:
"Submit"
,
colorButton:
(!
buttonActive
)
?
Colors
.
grey
:
null
,
onTap:
()
{
// TODO: dosomething here
if
(
buttonActive
)
{
Navigator
.
pushNamed
(
context
,
Routes
.
resetPasswordRoute
);
}
},
)
],
),
)
],
)
,
)
,
)
]
,
),
]
,
)
,
)
,
]
,
);
}
}
lib/page/reset_password/reset_password.dart
View file @
f2067cff
...
...
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import
'package:tour_travel_agr/helper/components_widget/custom_appbar.dart'
;
import
'package:tour_travel_agr/helper/components_widget/password_input.dart'
;
import
'package:tour_travel_agr/helper/components_widget/widget_button.dart'
;
import
'package:tour_travel_agr/helper/
components_widget/widget_text_field
.dart'
;
import
'package:tour_travel_agr/helper/
widget_responsive
.dart'
;
import
'package:tour_travel_agr/resource/assets.dart'
;
import
'package:tour_travel_agr/resource/colors.dart'
;
import
'package:tour_travel_agr/resource/size.dart'
;
...
...
@@ -24,113 +24,120 @@ class _ResetPasswordViewState extends State<ResetPasswordView> {
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
backgroundColor:
ColorManager
.
backgroundColor
,
body:
Container
(
padding:
EdgeInsets
.
only
(
top:
AppPadding
.
safeAreaTop
(
context
),
left:
AppPadding
.
p20
,
right:
AppPadding
.
p20
,
bottom:
AppPadding
.
safeAreaBot
(
context
),
),
child:
Column
(
children:
[
const
CustomAppBar
(
text:
"Reset Password"
,
),
Expanded
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m10
,
),
child:
Center
(
child:
Image
(
width:
216
,
height:
216
,
image:
AssetImage
(
Assets
.
resetPassword
,
),
),
),
body:
ScreenResponsive
(
widget:
bodyWidget
(
context
),
widthScreen:
MediaQuery
.
of
(
context
).
size
.
width
,
),
);
}
Container
bodyWidget
(
BuildContext
context
)
{
return
Container
(
padding:
EdgeInsets
.
only
(
top:
AppPadding
.
safeAreaTop
(
context
),
left:
AppPadding
.
p20
,
right:
AppPadding
.
p20
,
bottom:
AppPadding
.
safeAreaBot
(
context
),
),
child:
Column
(
children:
[
const
CustomAppBar
(
text:
"Reset Password"
,
),
Expanded
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m10
,
),
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m25
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"Reset"
,
style:
getSemiBoldStyle
(
color:
Colors
.
black
,
fontSize:
32
,
),
),
Text
(
"Password"
,
style:
getSemiBoldStyle
(
color:
Colors
.
black
,
fontSize:
32
,
),
)
],
child:
Center
(
child:
Image
(
width:
216
,
height:
216
,
image:
AssetImage
(
Assets
.
resetPassword
,
),
),
),
PasswordInput
(
passwordController:
passwordController
,
labelText:
"New Password"
,
marginTop:
AppMargin
.
m20
,
onChanged:
(
val
)
{
if
(
passwordController
.
text
.
isNotEmpty
&&
newPasswordController
.
text
.
isNotEmpty
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
setState
(()
{
buttonActive
=
false
;
});
}
},
),
PasswordInput
(
passwordController:
newPasswordController
,
labelText:
"Confirm New Password"
,
marginTop:
AppMargin
.
m20
,
onChanged:
(
val
)
{
if
(
passwordController
.
text
.
isNotEmpty
&&
newPasswordController
.
text
.
isNotEmpty
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
setState
(()
{
buttonActive
=
false
;
});
}
},
),
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m25
,
),
SizedBox
(
height:
AppMargin
.
m20
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"Reset"
,
style:
getSemiBoldStyle
(
color:
Colors
.
black
,
fontSize:
32
,
),
),
Text
(
"Password"
,
style:
getSemiBoldStyle
(
color:
Colors
.
black
,
fontSize:
32
,
),
)
],
),
CustomButton
(
text:
"Submit"
,
colorButton:
(!
buttonActive
)
?
Colors
.
grey
:
null
,
onTap:
()
{
if
(
buttonActive
)
{
// TODO: do something here
}
},
)
],
),
),
PasswordInput
(
passwordController:
passwordController
,
labelText:
"New Password"
,
marginTop:
AppMargin
.
m20
,
onChanged:
(
val
)
{
if
(
passwordController
.
text
.
isNotEmpty
&&
newPasswordController
.
text
.
isNotEmpty
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
setState
(()
{
buttonActive
=
false
;
});
}
},
),
PasswordInput
(
passwordController:
newPasswordController
,
labelText:
"Confirm New Password"
,
marginTop:
AppMargin
.
m20
,
onChanged:
(
val
)
{
if
(
passwordController
.
text
.
isNotEmpty
&&
newPasswordController
.
text
.
isNotEmpty
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
setState
(()
{
buttonActive
=
false
;
});
}
},
),
SizedBox
(
height:
AppMargin
.
m20
,
),
CustomButton
(
text:
"Submit"
,
colorButton:
(!
buttonActive
)
?
Colors
.
grey
:
null
,
onTap:
()
{
if
(
buttonActive
)
{
// TODO: do something here
}
},
)
],
),
)
],
)
,
)
,
)
]
,
),
);
}
...
...
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