Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
feelver
Overview
Overview
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
2F-ART
feelver
Commits
df2c3228
Commit
df2c3228
authored
Aug 17, 2020
by
Mobile : Art
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
18a3224b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
384 additions
and
99 deletions
+384
-99
lib/ui/payment/payment_booking_date_time.dart
+274
-0
lib/ui/payment/payment_detail.dart
+110
-99
No files found.
lib/ui/payment/payment_booking_date_time.dart
0 → 100644
View file @
df2c3228
import
'package:feelverapp/ui/menu/menu.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_datetime_picker/flutter_datetime_picker.dart'
;
class
PaymentBookingDateTime
extends
StatefulWidget
{
String
bith
=
'ปี / เดือน / วัน / เวลาเข้าใช้บริการ'
;
DateTime
day
;
@override
_PaymentBookingDateTimeState
createState
()
=>
_PaymentBookingDateTimeState
();
}
class
_PaymentBookingDateTimeState
extends
State
<
PaymentBookingDateTime
>
{
bool
checkBoxValue
=
false
;
int
a
=
1
;
int
b
=
1
;
@override
Widget
build
(
BuildContext
context
)
{
SizeConfig
(
context
);
return
Scaffold
(
body:
_setupView
(),
bottomNavigationBar:
Container
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
height:
SizeConfig
.
getWidth
(
130
),
child:
Column
(
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
0
),
top:
SizeConfig
.
getPadding
(
0
),
),
),
Container
(
alignment:
Alignment
.
center
,
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
10
),
right:
SizeConfig
.
getPadding
(
15
),
),
child:
Row
(
children:
<
Widget
>[
Checkbox
(
checkColor:
Color
(
0xFFEEAFB7
),
activeColor:
Colors
.
white
,
value:
checkBoxValue
,
onChanged:
(
bool
value
)
{
setState
(()
{
print
(
value
);
checkBoxValue
=
value
;
});
},
),
Text
(
'หากจองให้คนอื่น กรุณาทำเครื่องหมายช่องนี้'
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
),
),
Spacer
(),
],
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
top:
SizeConfig
.
getPadding
(
15
),
// bottom: SizeConfig.getPadding(15),
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
SizeConfig
.
getHeight
(
50
),
child:
RaisedButton
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
25.0
),
),
onPressed:
()
{
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => MyOrderStatus(),
// ),
// );
},
// padding: EdgeInsets.only(
// left: SizeConfig.getPadding(85),
// right: SizeConfig.getPadding(85),
// top: SizeConfig.getPadding(15),
// bottom: SizeConfig.getPadding(15),
// ),
color:
Color
(
0xFF3694A3
),
child:
Text
(
'ยืนยัน'
,
style:
TextStyle
(
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
white
,
),
),
),
),
],
),
),
);
}
_setupView
()
{
return
Column
(
children:
<
Widget
>[
header
(),
_formDate
(),
],
);
}
Widget
header
()
{
return
Container
(
child:
Stack
(
children:
<
Widget
>[
Container
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
height:
SizeConfig
.
getHeight
(
200
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
),
Positioned
(
top:
SizeConfig
.
getPadding
(
50
),
left:
SizeConfig
.
getPadding
(
MediaQuery
.
of
(
context
).
size
.
width
/
3.5
),
child:
Container
(
alignment:
Alignment
.
topCenter
,
child:
Image
.
asset
(
'assets/images/feelver_banner.png'
,
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.5
,
),
),
),
Positioned
(
top:
SizeConfig
.
getPadding
(
77
),
left:
SizeConfig
.
getPadding
(
16
),
child:
Container
(
child:
GestureDetector
(
onTap:
()
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
NavDrawer
();
},
);
},
child:
Image
.
asset
(
'assets/images/ic_menu.png'
,
height:
SizeConfig
.
getWidth
(
24
),
width:
SizeConfig
.
getWidth
(
30
),
fit:
BoxFit
.
cover
,
),
),
),
),
Positioned
(
top:
SizeConfig
.
getPadding
(
77
),
right:
SizeConfig
.
getPadding
(
60
),
child:
Container
(
child:
Image
.
asset
(
'assets/images/ic_noti.png'
,
height:
SizeConfig
.
getWidth
(
30
),
width:
SizeConfig
.
getWidth
(
30
),
fit:
BoxFit
.
cover
,
),
),
),
Positioned
(
top:
SizeConfig
.
getPadding
(
77
),
right:
SizeConfig
.
getPadding
(
20
),
child:
InkWell
(
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => LoginPage()),
// );
// },
child:
Container
(
child:
Image
.
asset
(
'assets/images/ic_userimg.png'
,
height:
SizeConfig
.
getWidth
(
30
),
width:
SizeConfig
.
getWidth
(
30
),
fit:
BoxFit
.
cover
,
),
),
),
),
],
),
);
}
Widget
_formDate
()
{
return
Container
(
child:
Form
(
child:
Column
(
children:
<
Widget
>[
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
30
),
top:
SizeConfig
.
getPadding
(
24
)),
child:
Text
(
'ระบุวันที่เข้าใช้บริการ'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
20
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
),
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
/
1
,
margin:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
12
),
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
)),
child:
Card
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
SizeConfig
.
getPadding
(
50.0
),
),
),
child:
FlatButton
(
onPressed:
()
{
DatePicker
.
showDateTimePicker
(
context
,
showTitleActions:
true
,
onChanged:
(
date
)
{
print
(
'change
$date
in time zone '
+
date
.
timeZoneOffset
.
inHours
.
toString
());
},
onConfirm:
(
date
)
{
setState
(()
{
widget
.
day
=
date
;
widget
.
bith
=
"
${widget.day.year}
-
${widget.day.month}
-
${widget.day.day}
เวลา
${widget.day.hour}
:
${widget.day.minute}
"
;
print
(
'
${widget.day.year}
/
${widget.day.month}
/
${widget.day.day}
'
);
print
(
widget
.
bith
);
});
print
(
'confirm
$date
'
);
},
currentTime:
DateTime
.
now
(),
locale:
LocaleType
.
th
);
},
child:
widget
.
bith
==
'ปี / เดือน / วัน / เวลาเข้าใช้บริการ'
?
Text
(
'ปี / เดือน / วัน / เวลาเข้าใช้บริการ'
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
)
:
Text
(
'
${widget.bith}
'
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),),
),
),
SizedBox
(
height:
SizeConfig
.
getWidth
(
30
),
),
],
),
),
);
}
}
lib/ui/payment/payment_detail.dart
View file @
df2c3228
import
'package:feelverapp/ui/menu/menu.dart'
;
import
'package:feelverapp/ui/payment/payment_booking_date_time.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:flutter/material.dart'
;
...
...
@@ -54,12 +55,12 @@ class _PaymentdetailState extends State<Paymentdetail> {
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
16
),
),
//
SizedBox(
//
height: SizeConfig.getHeight(16),
//
),
Expanded
(
child:
ListView
.
builder
(
itemCount:
5
,
itemCount:
1
,
itemBuilder:
(
BuildContext
ctxt
,
int
index
)
{
return
list1
(
'title'
);
},
...
...
@@ -72,112 +73,122 @@ class _PaymentdetailState extends State<Paymentdetail> {
}
list1
(
String
title
)
{
return
Container
(
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
6
),
bottom:
SizeConfig
.
getPadding
(
16
)),
child:
Column
(
children:
<
Widget
>[
Divider
(
color:
Colors
.
black
,
height:
SizeConfig
.
getHeight
(
16
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
16
),
),
Row
(
children:
<
Widget
>[
Text
(
'Order : 9S284-11506'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
Spacer
(),
Text
(
'23.02.2020 08:57'
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
],
return
GestureDetector
(
onTap:
(){
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
PaymentBookingDateTime
(),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
16
),
),
Row
(
children:
<
Widget
>[
Image
.
asset
(
'assets/images/demo_img.png'
,
height:
SizeConfig
.
getPadding
(
90
),
width:
SizeConfig
.
getPadding
(
80
),
fit:
BoxFit
.
cover
,
),
Expanded
(
child:
Container
(
);
},
child:
Container
(
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
6
),
bottom:
SizeConfig
.
getPadding
(
16
)),
child:
Column
(
children:
<
Widget
>[
Divider
(
color:
Colors
.
black
,
height:
SizeConfig
.
getHeight
(
1
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
16
),
),
Row
(
children:
<
Widget
>[
Text
(
'Order : 9S284-11506'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
Spacer
(),
Text
(
'23.02.2020 08:57'
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
],
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
16
),
),
Row
(
children:
<
Widget
>[
Image
.
asset
(
'assets/images/demo_img.png'
,
height:
SizeConfig
.
getPadding
(
90
),
width:
SizeConfig
.
getPadding
(
80
),
fit:
BoxFit
.
cover
,
),
Expanded
(
child:
Container
(
// color: Colors.green,
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
8
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Text
(
'Ivory Relax and Spa'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
12
),
),
Text
(
'นวดแผนไทย'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
15
),
),
Row
(
children:
<
Widget
>[
Text
(
'฿1,200.00'
,
style:
TextStyle
(
fontSize:
SizeConfig
.
getFontSize
(
20
),
color:
Color
(
0xFFFD2956
),
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
8
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Text
(
'Ivory Relax and Spa'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
12
),
),
Text
(
'นวดแผนไทย'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
,
fontWeight:
FontWeight
.
w500
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
15
),
),
Row
(
children:
<
Widget
>[
Text
(
'฿1,200.00'
,
style:
TextStyle
(
fontSize:
SizeConfig
.
getFontSize
(
20
),
color:
Color
(
0xFFFD2956
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
,
),
),
),
Spacer
(),
Text
(
'x1'
,
style:
TextStyle
(
color:
Color
(
0xFF9D9D9D
),
fontSize:
SizeConfig
.
getFontSize
(
20
),
Spacer
(
),
Text
(
'x1'
,
style:
TextStyle
(
color:
Color
(
0xFF9D9D9D
),
fontSize:
SizeConfig
.
getFontSize
(
20
),
),
),
)
,
]
,
)
,
]
,
]
,
)
,
]
,
)
,
),
),
),
],
),
],
),
// Divider(
// color: Colors.black,
// height: 40,
// ),
],
],
),
),
);
}
...
...
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