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
6665291f
Commit
6665291f
authored
May 25, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit profile page
parent
f944ddab
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
121 additions
and
23 deletions
+121
-23
edit_profile.png
assets/images/edit_profile.png
+0
-0
change_password.dart
lib/page/profile/change_password/change_password.dart
+0
-0
edit_profile.dart
lib/page/profile/edit_profile/edit_profile.dart
+98
-0
profile.dart
lib/page/profile/profile.dart
+16
-22
assets.dart
lib/resource/assets.dart
+1
-0
routes.dart
lib/resource/routes.dart
+5
-1
pubspec.yaml
pubspec.yaml
+1
-0
No files found.
assets/images/edit_profile.png
0 → 100644
View file @
6665291f
330 Bytes
lib/page/change_password/change_password.dart
→
lib/page/
profile/
change_password/change_password.dart
View file @
6665291f
File moved
lib/page/profile/edit_profile/edit_profile.dart
0 → 100644
View file @
6665291f
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/resource/assets.dart'
;
import
'package:tour_travel_agr/resource/colors.dart'
;
import
'package:tour_travel_agr/resource/size.dart'
;
class
EditProfileView
extends
StatefulWidget
{
const
EditProfileView
({
super
.
key
});
@override
State
<
EditProfileView
>
createState
()
=>
_EditProfileViewState
();
}
class
_EditProfileViewState
extends
State
<
EditProfileView
>
{
final
TextEditingController
nameController
=
TextEditingController
();
final
TextEditingController
nikController
=
TextEditingController
();
final
TextEditingController
hpController
=
TextEditingController
();
@override
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:
"Edit Profile"
),
Expanded
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Container
(
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m12
,
),
width:
112
,
height:
112
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
100
),
color:
const
Color
.
fromARGB
(
255
,
235
,
232
,
232
),
),
child:
Image
(
width:
52
,
height:
52
,
image:
AssetImage
(
Assets
.
editProfileSample
,
),
),
),
InputTextField
(
controller:
nameController
,
labelText:
"Nama Lengkap"
,
labelColor:
ColorManager
.
primary
,
borderSideActive:
true
,
hintText:
"Nama Lengkap"
,
marginTop:
18
,
),
InputTextField
(
controller:
nikController
,
labelText:
"NIK"
,
labelColor:
ColorManager
.
primary
,
borderSideActive:
true
,
hintText:
"Nomor Induk Kependudukan"
,
marginTop:
12
,
),
InputTextField
(
controller:
hpController
,
labelText:
"Nomor Handphone"
,
labelColor:
ColorManager
.
primary
,
borderSideActive:
true
,
hintText:
"628...."
,
marginTop:
12
,
inputType:
TextInputType
.
number
,
),
Container
(
margin:
const
EdgeInsets
.
only
(
top:
30
),
child:
const
CustomButton
(
text:
"Update"
,
),
)
],
),
),
)
],
),
),
);
}
}
lib/page/profile/profile.dart
View file @
6665291f
...
...
@@ -57,13 +57,21 @@ class BodyWidget extends StatelessWidget {
child:
Row
(
children:
[
const
Spacer
(),
Container
(
width:
24
,
height:
24
,
child:
Image
(
fit:
BoxFit
.
fill
,
image:
AssetImage
(
Assets
.
editIcon
,
GestureDetector
(
onTap:
()
{
Navigator
.
pushNamed
(
context
,
Routes
.
editProfileRoute
,
);
},
child:
Container
(
width:
24
,
height:
24
,
child:
Image
(
fit:
BoxFit
.
fill
,
image:
AssetImage
(
Assets
.
editIcon
,
),
),
),
),
...
...
@@ -132,20 +140,6 @@ class BodyWidget extends StatelessWidget {
],
),
),
GestureDetector
(
onTap:
()
{
Navigator
.
pop
(
context
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
AppPadding
.
p20
,
),
margin:
EdgeInsets
.
only
(
top:
AppMargin
.
m6
,
),
child:
const
Icon
(
Icons
.
arrow_back
),
),
),
GestureDetector
(
onTap:
()
{
Navigator
.
pushNamed
(
...
...
@@ -154,7 +148,7 @@ class BodyWidget extends StatelessWidget {
);
},
child:
PorfileButton
(
marginTop:
10
,
marginTop:
32
,
icon:
Assets
.
passwordIcon
,
text:
"Ganti Password"
,
),
...
...
lib/resource/assets.dart
View file @
6665291f
...
...
@@ -11,6 +11,7 @@ class Assets {
static
String
resetPassword
=
"
${rootImage}
reset_password.png"
;
static
String
homeBanner
=
"
${rootImage}
home_banner.png"
;
static
String
profileSample
=
"
${rootImage}
profile.jpg"
;
static
String
editProfileSample
=
"
${rootImage}
edit_profile.png"
;
// icons
static
String
reimburseIcon
=
"
${rootIcon}
reimburse.png"
;
...
...
lib/resource/routes.dart
View file @
6665291f
import
'package:flutter/material.dart'
;
import
'package:tour_travel_agr/page/change_password/change_password.dart'
;
import
'package:tour_travel_agr/page/
profile/
change_password/change_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/otp_verification/otp_verification.dart'
;
import
'package:tour_travel_agr/page/home/home.dart'
;
import
'package:tour_travel_agr/page/profile/edit_profile/edit_profile.dart'
;
import
'package:tour_travel_agr/page/profile/profile.dart'
;
import
'package:tour_travel_agr/page/register/register.dart'
;
import
'package:tour_travel_agr/page/reset_password/reset_password.dart'
;
...
...
@@ -19,6 +20,7 @@ class Routes {
static
const
String
changePasswordRoute
=
"/change-password"
;
static
const
String
homeRoute
=
"/home"
;
static
const
String
profileRoute
=
"/profile"
;
static
const
String
editProfileRoute
=
"/edit-profile"
;
static
const
String
reimburseRoute
=
"/reimbursement"
;
static
const
String
historyRoute
=
"/history"
;
}
...
...
@@ -44,6 +46,8 @@ class RouteGenerator {
return
pageRouteCustom
(
const
ProfileView
());
case
Routes
.
changePasswordRoute
:
return
pageRouteCustom
(
const
ChangePasswordView
());
case
Routes
.
editProfileRoute
:
return
pageRouteCustom
(
const
EditProfileView
());
default
:
return
unDefinedRoute
();
}
...
...
pubspec.yaml
View file @
6665291f
...
...
@@ -30,6 +30,7 @@ environment:
# versions available, run `flutter pub outdated`.
dependencies
:
cupertino_icons
:
^1.0.2
file_picker
:
^5.3.2
flutter
:
sdk
:
flutter
url_strategy
:
^0.2.0
...
...
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