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
a947689d
Commit
a947689d
authored
May 25, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changepassword page
parent
37ab7176
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
169 additions
and
4 deletions
+169
-4
logout_grey.png
assets/icons/logout_grey.png
+0
-0
password.png
assets/icons/password.png
+0
-0
change_password.dart
lib/page/change_password/change_password.dart
+158
-0
home.dart
lib/page/home/home.dart
+4
-4
assets.dart
lib/resource/assets.dart
+2
-0
routes.dart
lib/resource/routes.dart
+4
-0
size.dart
lib/resource/size.dart
+1
-0
No files found.
assets/icons/logout_grey.png
0 → 100644
View file @
a947689d
444 Bytes
assets/icons/password.png
0 → 100644
View file @
a947689d
509 Bytes
lib/page/change_password/change_password.dart
0 → 100644
View file @
a947689d
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/widget_responsive.dart'
;
import
'package:tour_travel_agr/resource/colors.dart'
;
import
'package:tour_travel_agr/resource/font.dart'
;
import
'package:tour_travel_agr/resource/size.dart'
;
import
'package:tour_travel_agr/resource/style.dart'
;
class
ChangePasswordView
extends
StatefulWidget
{
const
ChangePasswordView
({
super
.
key
});
@override
State
<
ChangePasswordView
>
createState
()
=>
_ChangePasswordViewState
();
}
class
_ChangePasswordViewState
extends
State
<
ChangePasswordView
>
{
final
TextEditingController
nowPasswordController
=
TextEditingController
();
final
TextEditingController
newPasswordController
=
TextEditingController
();
final
TextEditingController
confirmNewPasswordController
=
TextEditingController
();
bool
buttonActive
=
false
;
@override
void
initState
()
{
super
.
initState
();
}
@override
void
dispose
()
{
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
backgroundColor:
ColorManager
.
backgroundColor
,
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:
"Change Password"
,
),
Expanded
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
SizedBox
(
height:
AppMargin
.
m20
,
),
PasswordInput
(
passwordController:
nowPasswordController
,
labelText:
"Password Saat Ini"
,
borderSideActive:
true
,
labelColor:
ColorManager
.
primary
,
onChanged:
(
val
)
{
if
(
nowPasswordController
.
text
.
isNotEmpty
&&
newPasswordController
.
text
.
isNotEmpty
&&
confirmNewPasswordController
.
text
.
isNotEmpty
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
buttonActive
=
false
;
}
},
),
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m20
,
),
child:
Text
(
"Ubah password anda"
,
style:
getRegularStyle
(
color:
Colors
.
black
,
fontSize:
15
,
fontFamily:
FontConstants
.
mulish
,
),
),
),
SizedBox
(
height:
AppMargin
.
m12
,
),
PasswordInput
(
passwordController:
newPasswordController
,
labelText:
"Password Baru"
,
borderSideActive:
true
,
labelColor:
ColorManager
.
primary
,
onChanged:
(
val
)
{
if
(
nowPasswordController
.
text
.
isNotEmpty
&&
newPasswordController
.
text
.
isNotEmpty
&&
confirmNewPasswordController
.
text
.
isNotEmpty
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
buttonActive
=
false
;
}
},
),
PasswordInput
(
passwordController:
confirmNewPasswordController
,
labelText:
"Konfirmasi Password Baru"
,
borderSideActive:
true
,
labelColor:
ColorManager
.
primary
,
onChanged:
(
val
)
{
if
(
nowPasswordController
.
text
.
isNotEmpty
&&
newPasswordController
.
text
.
isNotEmpty
&&
confirmNewPasswordController
.
text
.
isNotEmpty
)
{
setState
(()
{
buttonActive
=
true
;
});
}
else
{
buttonActive
=
false
;
}
},
),
Container
(
margin:
const
EdgeInsets
.
only
(
top:
50
,
),
child:
CustomButton
(
text:
"Update"
,
colorButton:
(
buttonActive
)
?
null
:
Colors
.
grey
,
onTap:
()
{
if
(
buttonActive
)
{
// TODO: do something here
}
},
),
)
],
),
),
)
],
),
);
}
}
lib/page/home/home.dart
View file @
a947689d
...
@@ -96,7 +96,7 @@ class BodyWIdget extends StatelessWidget {
...
@@ -96,7 +96,7 @@ class BodyWIdget extends StatelessWidget {
horizontal:
AppPadding
.
p20
,
horizontal:
AppPadding
.
p20
,
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
space
Between
,
mainAxisAlignment:
MainAxisAlignment
.
space
Around
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
CardSectionHome
(
CardSectionHome
(
...
@@ -120,7 +120,7 @@ class BodyWIdget extends StatelessWidget {
...
@@ -120,7 +120,7 @@ class BodyWIdget extends StatelessWidget {
horizontal:
AppPadding
.
p20
,
horizontal:
AppPadding
.
p20
,
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
space
Between
,
mainAxisAlignment:
MainAxisAlignment
.
space
Around
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
GestureDetector
(
GestureDetector
(
...
@@ -169,8 +169,8 @@ class CardSectionHome extends StatelessWidget {
...
@@ -169,8 +169,8 @@ class CardSectionHome extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Container
(
return
Container
(
width:
1
63
,
width:
1
55
,
height:
1
63
,
height:
1
55
,
padding:
EdgeInsets
.
all
(
padding:
EdgeInsets
.
all
(
AppPadding
.
p20
,
AppPadding
.
p20
,
),
),
...
...
lib/resource/assets.dart
View file @
a947689d
...
@@ -19,4 +19,6 @@ class Assets {
...
@@ -19,4 +19,6 @@ class Assets {
static
String
logoutIcon
=
"
${rootIcon}
logout.png"
;
static
String
logoutIcon
=
"
${rootIcon}
logout.png"
;
static
String
editIcon
=
"
${rootIcon}
edit.png"
;
static
String
editIcon
=
"
${rootIcon}
edit.png"
;
static
String
phoneIcon
=
"
${rootIcon}
phone.png"
;
static
String
phoneIcon
=
"
${rootIcon}
phone.png"
;
static
String
logoutGreyIcon
=
"
${rootIcon}
logout_grey.png"
;
static
String
passwordIcon
=
"
${rootIcon}
password.png"
;
}
}
lib/resource/routes.dart
View file @
a947689d
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:tour_travel_agr/page/change_password/change_password.dart'
;
import
'package:tour_travel_agr/page/forgot_password/forgot_password.dart'
;
import
'package:tour_travel_agr/page/forgot_password/forgot_password.dart'
;
import
'package:tour_travel_agr/page/login/login.dart'
;
import
'package:tour_travel_agr/page/login/login.dart'
;
import
'package:tour_travel_agr/page/otp_verification/otp_verification.dart'
;
import
'package:tour_travel_agr/page/otp_verification/otp_verification.dart'
;
...
@@ -15,6 +16,7 @@ class Routes {
...
@@ -15,6 +16,7 @@ class Routes {
static
const
String
verificationRoute
=
"/verification"
;
static
const
String
verificationRoute
=
"/verification"
;
static
const
String
forgotPasswordRoute
=
"/forgot-password"
;
static
const
String
forgotPasswordRoute
=
"/forgot-password"
;
static
const
String
resetPasswordRoute
=
"/reset-password"
;
static
const
String
resetPasswordRoute
=
"/reset-password"
;
static
const
String
changePasswordRoute
=
"/change-password"
;
static
const
String
homeRoute
=
"/home"
;
static
const
String
homeRoute
=
"/home"
;
static
const
String
profileRoute
=
"/profile"
;
static
const
String
profileRoute
=
"/profile"
;
static
const
String
reimburseRoute
=
"/reimbursement"
;
static
const
String
reimburseRoute
=
"/reimbursement"
;
...
@@ -40,6 +42,8 @@ class RouteGenerator {
...
@@ -40,6 +42,8 @@ class RouteGenerator {
return
pageRouteCustom
(
const
HomeView
());
return
pageRouteCustom
(
const
HomeView
());
case
Routes
.
profileRoute
:
case
Routes
.
profileRoute
:
return
pageRouteCustom
(
const
ProfileView
());
return
pageRouteCustom
(
const
ProfileView
());
case
Routes
.
changePasswordRoute
:
return
pageRouteCustom
(
const
ChangePasswordView
());
default
:
default
:
return
unDefinedRoute
();
return
unDefinedRoute
();
}
}
...
...
lib/resource/size.dart
View file @
a947689d
...
@@ -11,6 +11,7 @@ class AppPadding {
...
@@ -11,6 +11,7 @@ class AppPadding {
static
double
p8
=
8
;
static
double
p8
=
8
;
static
double
p12
=
12
;
static
double
p12
=
12
;
static
double
p15
=
15
;
static
double
p20
=
20
;
static
double
p20
=
20
;
}
}
...
...
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