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
c5766bdc
Commit
c5766bdc
authored
May 25, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resposive profile page
parent
a947689d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
204 additions
and
95 deletions
+204
-95
profile.dart
lib/page/profile/profile.dart
+204
-95
No files found.
lib/page/profile/profile.dart
View file @
c5766bdc
// ignore_for_file: avoid_unnecessary_containers, sized_box_for_whitespace
import
'package:flutter/material.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'
;
...
...
@@ -13,9 +15,25 @@ class ProfileView extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
backgroundColor:
ColorManager
.
backgroundColor
,
body:
Stack
(
body:
ScreenResponsive
(
widget:
const
BodyWidget
(),
widthScreen:
MediaQuery
.
of
(
context
).
size
.
width
,
),
);
}
}
class
BodyWidget
extends
StatelessWidget
{
const
BodyWidget
({
Key
?
key
,
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
Stack
(
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
width:
double
.
infinity
,
...
...
@@ -94,6 +112,7 @@ class ProfileView extends StatelessWidget {
height:
40
,
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Image
(
width:
20
,
...
...
@@ -113,6 +132,38 @@ class ProfileView 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
(
context
,
Routes
.
changePasswordRoute
,
);
},
child:
PorfileButton
(
marginTop:
10
,
icon:
Assets
.
passwordIcon
,
text:
"Ganti Password"
,
),
),
PorfileButton
(
marginTop:
16
,
icon:
Assets
.
logoutGreyIcon
,
text:
"Log Out"
,
),
],
),
Positioned
(
...
...
@@ -127,6 +178,64 @@ class ProfileView extends StatelessWidget {
),
)
],
);
}
}
class
PorfileButton
extends
StatelessWidget
{
const
PorfileButton
({
Key
?
key
,
required
this
.
marginTop
,
required
this
.
text
,
required
this
.
icon
,
})
:
super
(
key:
key
);
final
double
marginTop
;
final
String
text
;
final
String
icon
;
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
AppPadding
.
p20
,
),
margin:
EdgeInsets
.
only
(
top:
marginTop
,
),
child:
Container
(
width:
double
.
infinity
,
height:
50
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
AppPadding
.
p20
,
vertical:
AppPadding
.
p15
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
const
Color
.
fromARGB
(
255
,
228
,
225
,
225
),
),
child:
Row
(
children:
[
Container
(
width:
16
,
height:
20
,
child:
Image
(
fit:
BoxFit
.
fill
,
image:
AssetImage
(
icon
,
),
),
),
SizedBox
(
width:
AppMargin
.
m18
,
),
Text
(
text
,
style:
getRegularStyle
(
color:
Colors
.
black
,
),
)
],
),
),
);
}
...
...
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