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
f97a4ff7
Commit
f97a4ff7
authored
Aug 27, 2020
by
Mobile : Ball (Apprentice)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.2fellows.com/art/feelver
into develop
# Conflicts: # lib/main.dart
parents
5497e545
633285b5
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
590 additions
and
651 deletions
+590
-651
lib/main.dart
+3
-1
lib/model/shopservice/shop_service_Model.dart
+25
-18
lib/service/api.dart
+7
-7
lib/ui/booking/booking_detail.dart
+26
-1
lib/ui/booking/booking_detail_presenter.dart
+3
-1
lib/ui/favorite/favorite.dart
+31
-19
lib/ui/favorite/favorite_presenter.dart
+6
-3
lib/ui/home/home.dart
+8
-2
lib/ui/menu/menu.dart
+161
-160
lib/ui/payment/mycart.dart
+44
-247
lib/ui/shop/shop_Nearby_places.dart
+3
-1
lib/ui/shop/shop_list_detail.dart
+180
-145
lib/ui/shop/shop_main.dart
+4
-2
lib/ui/shop/shop_reviews.dart
+11
-0
lib/ui/shop/shop_service.dart
+59
-34
lib/ui/shop/shop_service_presenter.dart
+11
-10
pubspec.lock
+7
-0
pubspec.yaml
+1
-0
No files found.
lib/main.dart
View file @
f97a4ff7
...
@@ -34,7 +34,9 @@ class MyApp extends StatelessWidget {
...
@@ -34,7 +34,9 @@ class MyApp extends StatelessWidget {
),
),
home:
ReviewShopPage
()
home:
SplashScreenPage
()
...
...
lib/model/shopservice/shop_service_Model.dart
View file @
f97a4ff7
...
@@ -76,20 +76,20 @@ class Data {
...
@@ -76,20 +76,20 @@ class Data {
String
price
;
String
price
;
String
specialPrice
;
String
specialPrice
;
String
sku
;
String
sku
;
dynamic
tax
;
Null
tax
;
int
quantity
;
int
quantity
;
dynamic
weight
;
Null
weight
;
String
visibility
;
String
visibility
;
dynamic
newsFromDate
;
Null
newsFromDate
;
dynamic
newsToDate
;
Null
newsToDate
;
dynamic
layout
;
Null
layout
;
dynamic
theme
;
Null
theme
;
String
duration
;
String
duration
;
dynamic
sellingStartTime
;
Null
sellingStartTime
;
dynamic
sellingEndTime
;
Null
sellingEndTime
;
dynamic
redemptionStartTime
;
Null
redemptionStartTime
;
dynamic
redemptionEndTime
;
Null
redemptionEndTime
;
dynamic
availibility
;
Null
availibility
;
String
isFeatured
;
String
isFeatured
;
String
isDeal
;
String
isDeal
;
String
hasTeam
;
String
hasTeam
;
...
@@ -107,13 +107,13 @@ class Data {
...
@@ -107,13 +107,13 @@ class Data {
int
attributeSetId
;
int
attributeSetId
;
int
vendorId
;
int
vendorId
;
String
allowRoute
;
String
allowRoute
;
String
type
;
Null
type
;
int
star
;
int
star
;
List
<
CategoryByProductId
>
categoryByProductId
;
List
<
CategoryByProductId
>
categoryByProductId
;
List
<
Null
>
ratings
;
List
<
Null
>
ratings
;
int
storeProductId
;
int
storeProductId
;
String
typeRateService
;
Null
typeRateService
;
String
priceRateService
;
Null
priceRateService
;
int
productId
;
int
productId
;
int
storeId
;
int
storeId
;
String
storeCode
;
String
storeCode
;
...
@@ -233,7 +233,12 @@ class Data {
...
@@ -233,7 +233,12 @@ class Data {
categoryByProductId
.
add
(
new
CategoryByProductId
.
fromJson
(
v
));
categoryByProductId
.
add
(
new
CategoryByProductId
.
fromJson
(
v
));
});
});
}
}
// if (json['ratings'] != null) {
// ratings = new List<Null>();
// json['ratings'].forEach((v) {
// ratings.add(new Null.fromJson(v));
// });
// }
storeProductId
=
json
[
'store_product_id'
];
storeProductId
=
json
[
'store_product_id'
];
typeRateService
=
json
[
'type_rate_service'
];
typeRateService
=
json
[
'type_rate_service'
];
priceRateService
=
json
[
'price_rate_service'
];
priceRateService
=
json
[
'price_rate_service'
];
...
@@ -297,7 +302,9 @@ class Data {
...
@@ -297,7 +302,9 @@ class Data {
data
[
'category_by_product_id'
]
=
data
[
'category_by_product_id'
]
=
this
.
categoryByProductId
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
this
.
categoryByProductId
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
}
// if (this.ratings != null) {
// data['ratings'] = this.ratings.map((v) => v.toJson()).toList();
// }
data
[
'store_product_id'
]
=
this
.
storeProductId
;
data
[
'store_product_id'
]
=
this
.
storeProductId
;
data
[
'type_rate_service'
]
=
this
.
typeRateService
;
data
[
'type_rate_service'
]
=
this
.
typeRateService
;
data
[
'price_rate_service'
]
=
this
.
priceRateService
;
data
[
'price_rate_service'
]
=
this
.
priceRateService
;
...
@@ -326,8 +333,8 @@ class CategoryByProductId {
...
@@ -326,8 +333,8 @@ class CategoryByProductId {
Null
type
;
Null
type
;
String
status
;
String
status
;
int
sortOrder
;
int
sortOrder
;
int
storeId
;
Null
storeId
;
int
vendorId
;
Null
vendorId
;
Null
createdAt
;
Null
createdAt
;
String
updatedAt
;
String
updatedAt
;
String
visibility
;
String
visibility
;
...
...
lib/service/api.dart
View file @
f97a4ff7
...
@@ -107,16 +107,16 @@ class Api<T> {
...
@@ -107,16 +107,16 @@ class Api<T> {
}
}
Future
<
Response
<
T
>>
shopservice
(
Object
body
)
async
{
Future
<
Response
<
T
>>
shopservice
(
String
url
)
async
{
var
_model
;
var
_model
;
var
_fail
;
var
_fail
;
var
result
;
var
result
;
print
(
"this is body
"
+
body
.
toString
());
print
(
"this is body
"
+
url
.
toString
());
// (body as Map)['lang'] = allTranslations.currentLanguage;
// (body as Map)['lang'] = allTranslations.currentLanguage;
await
_httpConnection
(
"
${this._baseApi}
/product/getListsProductFormat?vendor_id=9&store_id=284&is_paginate=1&per_page=1&v=1"
,
this
.
_headerApi
,
null
)
await
_httpConnection
(
url
.
toString
()
,
this
.
_headerApi
,
null
)
.
then
((
response
){
.
then
((
response
){
print
(
"ผลลัพท์ เท่ากับ"
+
"
${response.body}
"
);
print
(
"ผลลัพท์ เท่ากับ"
+
"
${response.body}
"
);
if
(
response
.
statusCode
==
200
){
if
(
response
.
statusCode
==
200
){
...
@@ -199,20 +199,20 @@ class Api<T> {
...
@@ -199,20 +199,20 @@ class Api<T> {
return
result
;
return
result
;
}
}
Future
<
Response
<
T
>>
getProductDetail
(
Object
body
)
async
{
Future
<
Response
<
T
>>
getProductDetail
(
String
url
)
async
{
var
_model
;
var
_model
;
var
_fail
;
var
_fail
;
var
result
;
var
result
;
print
(
"this is body "
+
body
.
toString
());
print
(
"this is body "
+
url
.
toString
());
// (body as Map)['lang'] = allTranslations.currentLanguage;
// (body as Map)['lang'] = allTranslations.currentLanguage;
await
http
.
get
(
Uri
.
encodeFull
(
"https://backend.feelver.com/api/product/1000?store_id=284&vendor_id=9"
),
headers:
this
.
_headerApi
).
then
((
response
)
{
await
http
.
get
(
Uri
.
encodeFull
(
url
.
toString
()),
headers:
this
.
_headerApi
,
).
then
((
response
)
{
print
(
"ผลลัพ เท่ากับบบบ2 "
+
"
${response.body}
"
);
print
(
"ผลลัพ เท่ากับบบบ2 "
+
"
${response.body}
"
);
print
(
"statusCode=
${response.statusCode}
"
);
print
(
"statusCode=
${response.statusCode}
"
);
if
(
response
.
statusCode
==
200
)
{
if
(
response
.
statusCode
==
200
)
{
print
(
"INif"
);
print
(
"INif"
);
// https://backend.feelver.com/api/product/1000?store_id=284&vendor_id=9
_model
=
ProductModel
.
fromJson
(
json
.
decode
(
response
.
body
));
_model
=
ProductModel
.
fromJson
(
json
.
decode
(
response
.
body
));
}
else
{
}
else
{
...
...
lib/ui/booking/booking_detail.dart
View file @
f97a4ff7
import
'package:feelverapp/ui/booking/booking_detail_presenter.dart'
;
import
'package:feelverapp/ui/booking/booking_detail_presenter.dart'
;
import
'package:feelverapp/ui/booking/bookingform.dart'
;
import
'package:feelverapp/ui/booking/bookingform.dart'
;
import
'package:feelverapp/ui/payment/mycart.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -27,6 +28,8 @@ class _BookingDetailState extends State<BookingDetail> {
...
@@ -27,6 +28,8 @@ class _BookingDetailState extends State<BookingDetail> {
// print(widget.getid);
// print(widget.getid);
presenter
=
BookingDetailtPresenter
(
this
);
presenter
=
BookingDetailtPresenter
(
this
);
setState
(()
{
setState
(()
{
presenter
.
vendor_id
=
widget
.
vendor_id
;
presenter
.
store_id
=
widget
.
store_id
;
presenter
.
getid
=
widget
.
getid
;
presenter
.
getid
=
widget
.
getid
;
});
});
presenter
.
getDetail
();
presenter
.
getDetail
();
...
@@ -98,6 +101,7 @@ class _BookingDetailState extends State<BookingDetail> {
...
@@ -98,6 +101,7 @@ class _BookingDetailState extends State<BookingDetail> {
:
Container
(
:
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
top:
SizeConfig
.
getPadding
(
16
),
top:
SizeConfig
.
getPadding
(
16
),
bottom:
SizeConfig
.
getPadding
(
16
)),
bottom:
SizeConfig
.
getPadding
(
16
)),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
...
@@ -243,6 +247,12 @@ class _BookingDetailState extends State<BookingDetail> {
...
@@ -243,6 +247,12 @@ class _BookingDetailState extends State<BookingDetail> {
// fontWeight: FontWeight.w500),
// fontWeight: FontWeight.w500),
// ),
// ),
// ),
// ),
Divider
(
color:
Colors
.
black
,
height:
SizeConfig
.
getHeight
(
35
),
indent:
20
,
endIndent:
20
,
),
SizedBox
(
SizedBox
(
height:
SizeConfig
.
getHeight
(
16
),
height:
SizeConfig
.
getHeight
(
16
),
),
),
...
@@ -372,7 +382,21 @@ class _BookingDetailState extends State<BookingDetail> {
...
@@ -372,7 +382,21 @@ class _BookingDetailState extends State<BookingDetail> {
fontWeight:
FontWeight
.
w500
),
fontWeight:
FontWeight
.
w500
),
),
),
),
),
Container
(
InkWell
(
onTap:
(){
Navigator
.
push
(
context
,
CupertinoPageRoute
(
builder:
(
context
)
=>
MyCart
(
// getid: presenter.model.result[0]
// .storeProduct[i].product.id,
// vendor_id: presenter.model.result[0].storeProduct[i]
// .product.vendorId,
// store_id: presenter.model.result[0].storeProduct[i].storeId,
),
),
);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
margin:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
20
),
top:
SizeConfig
.
getPadding
(
20
),
left:
SizeConfig
.
getPadding
(
250
)),
left:
SizeConfig
.
getPadding
(
250
)),
...
@@ -397,6 +421,7 @@ class _BookingDetailState extends State<BookingDetail> {
...
@@ -397,6 +421,7 @@ class _BookingDetailState extends State<BookingDetail> {
),
),
),
),
),
),
),
],
],
),
),
SizedBox
(
SizedBox
(
...
...
lib/ui/booking/booking_detail_presenter.dart
View file @
f97a4ff7
...
@@ -32,7 +32,9 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
...
@@ -32,7 +32,9 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
_api
=
Api
<
ProductModel
>();
_api
=
Api
<
ProductModel
>();
var
res
=
await
_api
.
getProductDetail
({});
var
res
=
await
_api
.
getProductDetail
(
'https://backend.feelver.com/api/product/'
+
getid
.
toString
()
+
'?store_id='
+
store_id
.
toString
()
+
'&vendor_id='
+
vendor_id
.
toString
()
);
if
(
res
.
fail
==
null
)
{
if
(
res
.
fail
==
null
)
{
if
(
res
.
success
.
status
)
{
if
(
res
.
success
.
status
)
{
...
...
lib/ui/favorite/favorite.dart
View file @
f97a4ff7
...
@@ -61,7 +61,21 @@ class _FavoriteState extends State<Favorite> {
...
@@ -61,7 +61,21 @@ class _FavoriteState extends State<Favorite> {
),
),
child:
Container
(
child:
Container
(
child:
presenter
.
favoriteModel
==
null
child:
presenter
.
favoriteModel
==
null
?
Container
()
?
Container
(
child:
Center
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
SizedBox
(
child:
CircularProgressIndicator
(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
),),
height:
30.0
,
width:
30.0
,
),]
))
)
:
ListView
.
builder
(
:
ListView
.
builder
(
itemCount:
presenter
.
favoriteModel
.
wishListItem
.
length
,
itemCount:
presenter
.
favoriteModel
.
wishListItem
.
length
,
itemBuilder:
(
context
,
i
)
{
itemBuilder:
(
context
,
i
)
{
...
@@ -98,7 +112,7 @@ class _FavoriteState extends State<Favorite> {
...
@@ -98,7 +112,7 @@ class _FavoriteState extends State<Favorite> {
.
cover
,
.
cover
,
width:
SizeConfig
.
getWidth
(
110
),
width:
SizeConfig
.
getWidth
(
110
),
height:
SizeConfig
.
getHeight
(
150
),
height:
SizeConfig
.
getHeight
(
150
),
fit:
BoxFit
.
fitWidth
,
fit:
BoxFit
.
cover
,
),
),
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
...
@@ -115,13 +129,15 @@ class _FavoriteState extends State<Favorite> {
...
@@ -115,13 +129,15 @@ class _FavoriteState extends State<Favorite> {
child:
Row
(
child:
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
child:
Text
(
child:
Text
(
presenter
.
favoriteModel
.
wishListItem
[
index
].
product
.
name
,
presenter
.
favoriteModel
.
wishListItem
[
index
]
.
product
.
name
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black
,
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
15
)),
fontSize:
SizeConfig
.
getFontSize
(
15
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
maxLines:
2
,
maxLines:
2
,
),
),
),
),
...
@@ -146,7 +162,9 @@ class _FavoriteState extends State<Favorite> {
...
@@ -146,7 +162,9 @@ class _FavoriteState extends State<Favorite> {
'นวดเเผนไทย'
,
'นวดเเผนไทย'
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black
,
color:
Colors
.
black
,
),
fontSize:
SizeConfig
.
getFontSize
(
14
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
),
),
),
SizedBox
(
SizedBox
(
...
@@ -223,7 +241,7 @@ class _FavoriteState extends State<Favorite> {
...
@@ -223,7 +241,7 @@ class _FavoriteState extends State<Favorite> {
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
height:
SizeConfig
.
getHeight
(
20
0
),
height:
SizeConfig
.
getHeight
(
18
0
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
),
),
Positioned
(
Positioned
(
...
@@ -239,23 +257,17 @@ class _FavoriteState extends State<Favorite> {
...
@@ -239,23 +257,17 @@ class _FavoriteState extends State<Favorite> {
),
),
),
),
Positioned
(
Positioned
(
top:
SizeConfig
.
getPadding
(
7
7
),
top:
SizeConfig
.
getPadding
(
7
0
),
left:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
child:
Container
(
child:
Container
(
child:
GestureDetector
(
child:
GestureDetector
(
onTap:
()
{
onTap:
()
{
showDialog
(
Navigator
.
pop
(
context
);
context:
context
,
builder:
(
BuildContext
context
)
{
return
NavDrawer
();
},
},
);
child:
Icon
(
},
Icons
.
keyboard_arrow_left
,
child:
Image
.
asset
(
color:
Colors
.
white
,
'assets/images/ic_menu.png'
,
size:
SizeConfig
.
getFontSize
(
40
),
height:
SizeConfig
.
getWidth
(
24
),
width:
SizeConfig
.
getWidth
(
30
),
fit:
BoxFit
.
cover
,
),
),
),
),
),
),
...
...
lib/ui/favorite/favorite_presenter.dart
View file @
f97a4ff7
import
'package:feelverapp/model/favorite/delete_favorite_Model.dart'
;
import
'package:feelverapp/model/favorite/delete_favorite_Model.dart'
;
import
'package:feelverapp/model/favorite/favorite_Model.dart'
;
import
'package:feelverapp/model/favorite/favorite_Model.dart'
;
import
'package:feelverapp/service/Loading.dart'
;
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/service/base_presenter.dart'
;
import
'package:feelverapp/service/base_presenter.dart'
;
import
'package:feelverapp/ui/favorite/favorite.dart'
;
import
'package:feelverapp/ui/favorite/favorite.dart'
;
...
@@ -15,11 +16,11 @@ class FavoritePresenter extends BasePresenter<Favorite> {
...
@@ -15,11 +16,11 @@ class FavoritePresenter extends BasePresenter<Favorite> {
FavoritePresenter
(
State
<
Favorite
>
state
)
:
super
(
state
);
FavoritePresenter
(
State
<
Favorite
>
state
)
:
super
(
state
);
Favoriteitem
()
async
{
Favoriteitem
()
async
{
var
_id
=
await
AccountUtil
.
getID
();
var
_id
=
await
AccountUtil
.
getID
();
print
(
_id
);
print
(
"555555555555"
);
_api
=
Api
<
FavoriteModel
>();
_api
=
Api
<
FavoriteModel
>();
var
res
=
await
_api
.
favorite
({
var
res
=
await
_api
.
favorite
({
"customer_id"
:
_id
,
"customer_id"
:
_id
,
});
});
...
@@ -34,11 +35,13 @@ class FavoritePresenter extends BasePresenter<Favorite> {
...
@@ -34,11 +35,13 @@ class FavoritePresenter extends BasePresenter<Favorite> {
}
}
Deletefavoriteitem
(
String
id
)
async
{
Deletefavoriteitem
(
String
id
)
async
{
LoadingView
(
state
.
context
).
show
();
_api
=
Api
<
DeletefavoriteModel
>();
_api
=
Api
<
DeletefavoriteModel
>();
var
res
=
await
_api
.
deletefavorite
({
var
res
=
await
_api
.
deletefavorite
({
"id"
:
id
,
"id"
:
id
,
});
});
LoadingView
(
state
.
context
).
hide
();
if
(
res
.
fail
==
null
)
{
if
(
res
.
fail
==
null
)
{
setState
(()
{
setState
(()
{
deletefavoriteModel
=
res
.
success
;
deletefavoriteModel
=
res
.
success
;
...
...
lib/ui/home/home.dart
View file @
f97a4ff7
...
@@ -77,6 +77,12 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -77,6 +77,12 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
height:
SizeConfig
.
getWidth
(
24
),
height:
SizeConfig
.
getWidth
(
24
),
),
),
onPressed:
()
{
onPressed:
()
{
setState
(()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
HomePage
()),
);
});
print
(
"Pressed"
);
print
(
"Pressed"
);
},
},
),
),
...
@@ -259,7 +265,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -259,7 +265,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
all
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
SizeConfig
.
getWidth
(
56
))),
Radius
.
circular
(
SizeConfig
.
getWidth
(
56
))),
child:
Image
.
network
(
child:
presenter
.
getmodel
.
result
[
0
].
image
==
null
?
Container
():
Image
.
network
(
presenter
.
getmodel
.
result
[
0
].
image
,
presenter
.
getmodel
.
result
[
0
].
image
,
fit:
BoxFit
.
contain
,
fit:
BoxFit
.
contain
,
width:
SizeConfig
.
getWidth
(
30
),
width:
SizeConfig
.
getWidth
(
30
),
...
@@ -285,7 +291,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -285,7 +291,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
all
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
SizeConfig
.
getWidth
(
56
))),
Radius
.
circular
(
SizeConfig
.
getWidth
(
56
))),
child:
Image
.
network
(
child:
presenter
.
getmodel
.
result
[
0
].
image
==
null
?
Container
():
Image
.
network
(
presenter
.
getmodel
.
result
[
0
].
image
,
presenter
.
getmodel
.
result
[
0
].
image
,
fit:
BoxFit
.
contain
,
fit:
BoxFit
.
contain
,
width:
SizeConfig
.
getWidth
(
30
),
width:
SizeConfig
.
getWidth
(
30
),
...
...
lib/ui/menu/menu.dart
View file @
f97a4ff7
...
@@ -155,7 +155,7 @@ class _NavDrawerState extends State<NavDrawer> with TickerProviderStateMixin {
...
@@ -155,7 +155,7 @@ class _NavDrawerState extends State<NavDrawer> with TickerProviderStateMixin {
left:
SizeConfig
.
getPadding
(
30
)),
left:
SizeConfig
.
getPadding
(
30
)),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
child:
Text
(
'My order
Status
'
,
'My order '
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black
,
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontSize:
SizeConfig
.
getFontSize
(
16
),
...
@@ -164,165 +164,166 @@ class _NavDrawerState extends State<NavDrawer> with TickerProviderStateMixin {
...
@@ -164,165 +164,166 @@ class _NavDrawerState extends State<NavDrawer> with TickerProviderStateMixin {
),
),
),
),
),
),
GestureDetector
(
// GestureDetector(
onTap:
()
{},
// onTap: () {},
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
12
),
// top: SizeConfig.getPadding(12),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'รายการสั่งซื้อที่สำเร็จ'
,
// 'รายการสั่งซื้อที่สำเร็จ',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
),
// ),
GestureDetector
(
// GestureDetector(
onTap:
()
{},
// onTap: () {},
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
12
),
// top: SizeConfig.getPadding(12),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'จองแล้ว'
,
// 'จองแล้ว',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
),
// ),
GestureDetector
(
// GestureDetector(
onTap:
()
{},
// onTap: () {},
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
12
),
// top: SizeConfig.getPadding(12),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'ยังไม่ได้จอง'
,
// 'ยังไม่ได้จอง',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
),
// ),
GestureDetector
(
// GestureDetector(
onTap:
()
{},
// onTap: () {},
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
12
),
// top: SizeConfig.getPadding(12),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'รายการสั่งซื้อไม่สำเร็จ'
,
// 'รายการสั่งซื้อไม่สำเร็จ',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
30
),
// top: SizeConfig.getPadding(30),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'language'
,
// 'language',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
Row
(
// Row(
children:
<
Widget
>[
// children: <Widget>[
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
left:
SizeConfig
.
getPadding
(
30
),
// left: SizeConfig.getPadding(30),
top:
SizeConfig
.
getPadding
(
16
)),
// top: SizeConfig.getPadding(16)),
child:
Image
.
asset
(
// child: Image.asset(
'assets/images/ic_th.png'
,
// 'assets/images/ic_th.png',
width:
SizeConfig
.
getWidth
(
50
),
// width: SizeConfig.getWidth(50),
height:
SizeConfig
.
getWidth
(
50
),
// height: SizeConfig.getWidth(50),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
left:
SizeConfig
.
getPadding
(
30
),
// left: SizeConfig.getPadding(30),
top:
SizeConfig
.
getPadding
(
16
)),
// top: SizeConfig.getPadding(16)),
child:
Image
.
asset
(
// child: Image.asset(
'assets/images/ic_en.png'
,
// 'assets/images/ic_en.png',
width:
SizeConfig
.
getWidth
(
50
),
// width: SizeConfig.getWidth(50),
height:
SizeConfig
.
getWidth
(
50
),
// height: SizeConfig.getWidth(50),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
left:
SizeConfig
.
getPadding
(
30
),
// left: SizeConfig.getPadding(30),
top:
SizeConfig
.
getPadding
(
16
)),
// top: SizeConfig.getPadding(16)),
child:
Image
.
asset
(
// child: Image.asset(
'assets/images/ic_ch.png'
,
// 'assets/images/ic_ch.png',
width:
SizeConfig
.
getWidth
(
50
),
// width: SizeConfig.getWidth(50),
height:
SizeConfig
.
getWidth
(
50
),
// height: SizeConfig.getWidth(50),
),
// ),
),
// ),
],
// ],
),
// ),
Row
(
// Row(
children:
<
Widget
>[
// children: <Widget>[
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
0
,
left:
SizeConfig
.
getPadding
(
42
)),
// top: 0, left: SizeConfig.getPadding(42)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'TH'
,
// 'TH',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
0
,
left:
SizeConfig
.
getPadding
(
60
)),
// top: 0, left: SizeConfig.getPadding(60)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'EN'
,
// 'EN',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
0
,
left:
SizeConfig
.
getPadding
(
60
)),
// top: 0, left: SizeConfig.getPadding(60)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'CH'
,
// 'CH',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
],
// ],
),
// ),
SizedBox
(
height:
50
),
Row
(
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
...
...
lib/ui/payment/mycart.dart
View file @
f97a4ff7
...
@@ -48,9 +48,8 @@ class _MyCartState extends State<MyCart> {
...
@@ -48,9 +48,8 @@ class _MyCartState extends State<MyCart> {
),
),
),
),
Container
(
Container
(
height:
SizeConfig
.
getHeight
(
40
),
height:
SizeConfig
.
getHeight
(
40
),
width:
SizeConfig
.
getWidth
(
20
0
),
width:
SizeConfig
.
getWidth
(
18
0
),
color:
Colors
.
white
,
color:
Colors
.
white
,
child:
TextField
(
child:
TextField
(
decoration:
InputDecoration
(
decoration:
InputDecoration
(
...
@@ -62,7 +61,7 @@ class _MyCartState extends State<MyCart> {
...
@@ -62,7 +61,7 @@ class _MyCartState extends State<MyCart> {
icon:
Icon
(
icon:
Icon
(
Icons
.
keyboard_arrow_right
,
Icons
.
keyboard_arrow_right
,
color:
Colors
.
white
,
color:
Colors
.
white
,
size:
4
0
,
size:
3
0
,
),
),
onPressed:
()
{}),
onPressed:
()
{}),
],
],
...
@@ -121,7 +120,6 @@ class _MyCartState extends State<MyCart> {
...
@@ -121,7 +120,6 @@ class _MyCartState extends State<MyCart> {
),
),
Spacer
(),
Spacer
(),
Container
(
Container
(
child:
RaisedButton
(
child:
RaisedButton
(
shape:
RoundedRectangleBorder
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
30.0
),
borderRadius:
BorderRadius
.
circular
(
30.0
),
...
@@ -163,50 +161,52 @@ class _MyCartState extends State<MyCart> {
...
@@ -163,50 +161,52 @@ class _MyCartState extends State<MyCart> {
return
Column
(
return
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
header
(),
header
(),
containt
(),
],
);
}
Widget
containt
()
{
return
Expanded
(
child:
SingleChildScrollView
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
10
),
right:
SizeConfig
.
getPadding
(
10
),
top:
SizeConfig
.
getPadding
(
8
),
bottom:
SizeConfig
.
getPadding
(
8
),
),
child:
Container
(
alignment:
FractionalOffset
.
topLeft
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
SizedBox
(
SizedBox
(
height:
SizeConfig
.
getHeight
(
15
),
height:
SizeConfig
.
getHeight
(
15
),
),
),
list1
(),
list1
(),
list2
(),
Divider
(
color:
Colors
.
black
,
height:
SizeConfig
.
getHeight
(
40
),
),
// list3(),
],
],
),
),
),
);
);
}
}
// Widget containt() {
// return Expanded(
// child: SingleChildScrollView(
// padding: EdgeInsets.only(
// left: SizeConfig.getPadding(10),
// right: SizeConfig.getPadding(10),
// top: SizeConfig.getPadding(8),
// bottom: SizeConfig.getPadding(8),
// ),
// child: Container(
// alignment: FractionalOffset.topLeft,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// SizedBox(
// height: SizeConfig.getHeight(15),
// ),
// list1(),
// Divider(
// color: Colors.black,
// height: SizeConfig.getHeight(40),
// ),
//// list3(),
// ],
// ),
// ),
// ),
// );
// }
Widget
list1
()
{
Widget
list1
()
{
return
Card
(
return
Card
(
elevation:
5
,
elevation:
5
,
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
1
2
),
left:
SizeConfig
.
getPadding
(
1
6
),
top:
SizeConfig
.
getPadding
(
8
),
top:
SizeConfig
.
getPadding
(
8
),
right:
SizeConfig
.
getPadding
(
1
0
),
right:
SizeConfig
.
getPadding
(
1
6
),
bottom:
SizeConfig
.
getPadding
(
8
),
bottom:
SizeConfig
.
getPadding
(
8
),
),
),
// color: Colors.red,
// color: Colors.red,
...
@@ -222,7 +222,7 @@ class _MyCartState extends State<MyCart> {
...
@@ -222,7 +222,7 @@ class _MyCartState extends State<MyCart> {
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
10
),
left:
SizeConfig
.
getPadding
(
5
),
right:
SizeConfig
.
getPadding
(
5
),
right:
SizeConfig
.
getPadding
(
5
),
),
),
child:
Column
(
child:
Column
(
...
@@ -269,168 +269,6 @@ class _MyCartState extends State<MyCart> {
...
@@ -269,168 +269,6 @@ class _MyCartState extends State<MyCart> {
// color: Colors.yellow,
// color: Colors.yellow,
child:
Row
(
child:
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Image
.
asset
(
'assets/images/clock.png'
,
height:
SizeConfig
.
getHeight
(
20
),
width:
SizeConfig
.
getWidth
(
20
),
),
SizedBox
(
width:
SizeConfig
.
getWidth
(
5
),
),
Text
(
'90 นาที'
),
Spacer
(),
Icon
(
Icons
.
local_offer
,
color:
Color
(
0xFFEEAFB7
),
),
Text
(
'฿1,599.00'
,
style:
TextStyle
(
decoration:
TextDecoration
.
lineThrough
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
color:
Color
(
0xFFEEAFB7
),
),
),
],
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
5
),
),
Container
(
// color: Colors.orangeAccent,
child:
Row
(
children:
<
Widget
>[
SizedBox
(
width:
SizeConfig
.
getPadding
(
20
),
height:
SizeConfig
.
getPadding
(
20
),
child:
RaisedButton
(
child:
Text
(
'-'
),
padding:
EdgeInsets
.
only
(
right:
SizeConfig
.
getPadding
(
0
),
),
onPressed:
()
{
setState
(()
{
a
=
a
-
1
;
});
},
),
),
Padding
(
padding:
const
EdgeInsets
.
only
(
right:
8
,
left:
8
),
child:
Text
(
'
$a
'
),
),
SizedBox
(
width:
SizeConfig
.
getPadding
(
20
),
height:
SizeConfig
.
getPadding
(
20
),
child:
RaisedButton
(
child:
Text
(
'+'
),
padding:
EdgeInsets
.
only
(
right:
SizeConfig
.
getPadding
(
0
),
),
onPressed:
()
{
setState
(()
{
a
=
a
+
1
;
});
},
),
),
Spacer
(),
Text
(
'฿1,200.00'
,
style:
TextStyle
(
fontSize:
SizeConfig
.
getFontSize
(
20
),
color:
Color
(
0xFFFD2956
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
bold
,
),
),
],
),
),
],
),
),
),
],
),
),
);
}
Widget
list2
()
{
return
Card
(
child:
Container
(
// color: Colors.red,
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
12
),
top:
SizeConfig
.
getPadding
(
8
),
right:
SizeConfig
.
getPadding
(
10
),
bottom:
SizeConfig
.
getPadding
(
8
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
Image
.
asset
(
'assets/images/demo_img.png'
,
width:
SizeConfig
.
getWidth
(
110
),
height:
SizeConfig
.
getHeight
(
150
),
fit:
BoxFit
.
fitWidth
,
),
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
10
),
right:
SizeConfig
.
getPadding
(
5
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Container
(
// color: Colors.blue,
child:
Row
(
children:
<
Widget
>[
Text
(
'Ivory Relax and Spa'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontWeight:
FontWeight
.
bold
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
),
),
Spacer
(),
IconButton
(
icon:
Icon
(
Icons
.
delete
),
color:
Colors
.
black
,
onPressed:
()
{
print
(
'delete'
);
},
),
],
),
),
Container
(
// color: Colors.white,
child:
Text
(
'นวดเเผนไทย'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontWeight:
FontWeight
.
bold
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
),
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
5
),
),
Container
(
// color: Colors.yellow,
child:
Row
(
children:
<
Widget
>[
Image
.
asset
(
Image
.
asset
(
'assets/images/clock.png'
,
'assets/images/clock.png'
,
height:
SizeConfig
.
getHeight
(
20
),
height:
SizeConfig
.
getHeight
(
20
),
...
@@ -522,18 +360,16 @@ class _MyCartState extends State<MyCart> {
...
@@ -522,18 +360,16 @@ class _MyCartState extends State<MyCart> {
}
}
Widget
header
()
{
Widget
header
()
{
return
Container
(
return
Stack
(
child:
Stack
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
height:
SizeConfig
.
getHeight
(
20
0
),
height:
SizeConfig
.
getHeight
(
15
0
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
),
),
Positioned
(
Positioned
(
top:
SizeConfig
.
getPadding
(
50
),
top:
SizeConfig
.
getPadding
(
50
),
left:
left:
SizeConfig
.
getPadding
(
MediaQuery
.
of
(
context
).
size
.
width
/
3.5
),
SizeConfig
.
getPadding
(
MediaQuery
.
of
(
context
).
size
.
width
/
3.5
),
child:
Container
(
child:
Container
(
alignment:
Alignment
.
topCenter
,
alignment:
Alignment
.
topCenter
,
child:
Image
.
asset
(
child:
Image
.
asset
(
...
@@ -543,61 +379,22 @@ class _MyCartState extends State<MyCart> {
...
@@ -543,61 +379,22 @@ class _MyCartState extends State<MyCart> {
),
),
),
),
Positioned
(
Positioned
(
top:
SizeConfig
.
getPadding
(
77
),
top:
SizeConfig
.
getPadding
(
70
),
left:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
child:
Container
(
child:
Container
(
child:
GestureDetector
(
child:
GestureDetector
(
onTap:
()
{
onTap:
()
{
showDialog
(
Navigator
.
pop
(
context
);
context:
context
,
builder:
(
BuildContext
context
)
{
return
NavDrawer
();
},
},
);
child:
Icon
(
},
Icons
.
keyboard_arrow_left
,
child:
Image
.
asset
(
color:
Colors
.
white
,
'assets/images/ic_menu.png'
,
size:
SizeConfig
.
getFontSize
(
40
),
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
,
),
),
),
),
),
),
),
),
],
],
),
);
);
}
}
}
}
lib/ui/shop/shop_Nearby_places.dart
View file @
f97a4ff7
...
@@ -189,7 +189,9 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>
...
@@ -189,7 +189,9 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>
child:
Center
(
child:
Center
(
child:
CircularProgressIndicator
(
child:
CircularProgressIndicator
(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
Colors
.
teal
),
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
Colors
.
teal
),
)))
),
),
)
:
Container
(
:
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
80
),
top:
SizeConfig
.
getPadding
(
80
),
...
...
lib/ui/shop/shop_list_detail.dart
View file @
f97a4ff7
import
'package:carousel_pro/carousel_pro.dart'
;
import
'package:carousel_pro/carousel_pro.dart'
;
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/ui/booking/bookingflow.dart'
;
import
'package:feelverapp/ui/home/home.dart'
;
import
'package:feelverapp/ui/home/home.dart'
;
import
'package:feelverapp/ui/menu/menu.dart'
;
import
'package:feelverapp/ui/menu/menu.dart'
;
import
'package:feelverapp/ui/payment/mycart.dart'
;
import
'package:feelverapp/ui/review_shop/review_shop_page.dart'
;
import
'package:feelverapp/ui/shop/shop_main.dart'
;
import
'package:feelverapp/ui/shop/shop_reviews.dart'
;
import
'package:feelverapp/ui/shop/shop_main.dart'
;
import
'package:feelverapp/ui/shop/shoplistdetail_presenter.dart'
;
import
'package:feelverapp/ui/shop/shoplistdetail_presenter.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
...
@@ -9,13 +15,18 @@ import 'package:flutter/material.dart';
...
@@ -9,13 +15,18 @@ import 'package:flutter/material.dart';
class
ShopListDetail
extends
StatefulWidget
{
class
ShopListDetail
extends
StatefulWidget
{
String
id
;
String
id
;
ShopListDetail
({
Key
key
,
this
.
id
,})
:
super
(
key:
key
);
ShopListDetail
({
Key
key
,
this
.
id
,
})
:
super
(
key:
key
);
@override
@override
_ShopListDetailState
createState
()
=>
_ShopListDetailState
();
_ShopListDetailState
createState
()
=>
_ShopListDetailState
();
}
}
class
_ShopListDetailState
extends
State
<
ShopListDetail
>
{
class
_ShopListDetailState
extends
State
<
ShopListDetail
>
{
bool
fav
=
false
;
bool
fav
=
false
;
ShoplistdetailPresenter
presenter
;
ShoplistdetailPresenter
presenter
;
@override
@override
...
@@ -28,7 +39,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -28,7 +39,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
// List values = presenter.model.result[0].location.split(","); // split() will split from . and gives new List with separated elements.
// List values = presenter.model.result[0].location.split(","); // split() will split from . and gives new List with separated elements.
//values.forEach(print);
//values.forEach(print);
}
}
@override
@override
...
@@ -40,14 +50,17 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -40,14 +50,17 @@ class _ShopListDetailState extends State<ShopListDetail> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
SizeConfig
(
context
);
SizeConfig
(
context
);
return
Scaffold
(
return
Scaffold
(
body:
presenter
.
model
==
null
?
Container
(
child:
body:
presenter
.
model
==
null
Center
(
child:
CircularProgressIndicator
(
?
Container
(
child:
Center
(
child:
CircularProgressIndicator
(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
),
),
),),
),
):
_setupView
(),
),
)
:
_setupView
(),
);
);
}
}
...
@@ -81,7 +94,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -81,7 +94,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
),
),
),
),
Positioned
(
Positioned
(
top:
SizeConfig
.
getPadding
(
7
7
),
top:
SizeConfig
.
getPadding
(
7
0
),
left:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
child:
Container
(
child:
Container
(
child:
GestureDetector
(
child:
GestureDetector
(
...
@@ -91,32 +104,38 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -91,32 +104,38 @@ class _ShopListDetailState extends State<ShopListDetail> {
child:
Icon
(
child:
Icon
(
Icons
.
keyboard_arrow_left
,
Icons
.
keyboard_arrow_left
,
color:
Colors
.
white
,
color:
Colors
.
white
,
size:
SizeConfig
.
getFontSize
(
24
),
size:
SizeConfig
.
getFontSize
(
40
),
),
),
),
),
),
),
),
),
],
],
),
),
Container
(
Container
(
height:
SizeConfig
.
getHeight
(
2
4
0
),
height:
SizeConfig
.
getHeight
(
2
7
0
),
child:
Stack
(
child:
Stack
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
height:
SizeConfig
.
getHeight
(
19
0
),
height:
SizeConfig
.
getHeight
(
23
0
),
width:
SizeConfig
.
getHeight
(
350
),
width:
SizeConfig
.
getWidth
(
MediaQuery
.
of
(
context
).
size
.
width
),
child:
Carousel
(
child:
Carousel
(
images:
[
images:
[
Image
.
network
(
presenter
.
model
.
result
[
0
].
storeCover
,
Image
.
network
(
presenter
.
model
.
result
[
0
].
storeCover
,
fit:
BoxFit
.
cover
,),
fit:
BoxFit
.
cover
,
Image
.
network
(
presenter
.
model
.
result
[
0
].
storeCover
,
fit:
BoxFit
.
cover
,),
),
Image
.
network
(
presenter
.
model
.
result
[
0
].
storeCover
,
fit:
BoxFit
.
cover
,),
Image
.
network
(
Image
.
network
(
presenter
.
model
.
result
[
0
].
storeCover
,
fit:
BoxFit
.
cover
,),
presenter
.
model
.
result
[
0
].
storeCover
,
fit:
BoxFit
.
cover
,
),
Image
.
network
(
presenter
.
model
.
result
[
0
].
storeCover
,
fit:
BoxFit
.
cover
,
),
Image
.
network
(
presenter
.
model
.
result
[
0
].
storeCover
,
fit:
BoxFit
.
cover
,
),
],
],
animationDuration:
const
Duration
(
milliseconds:
300
),
animationDuration:
const
Duration
(
milliseconds:
300
),
dotSize:
8.0
,
dotSize:
8.0
,
...
@@ -140,49 +159,43 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -140,49 +159,43 @@ class _ShopListDetailState extends State<ShopListDetail> {
child:
InkResponse
(
child:
InkResponse
(
highlightShape:
BoxShape
.
circle
,
highlightShape:
BoxShape
.
circle
,
highlightColor:
Color
(
0xFFDD175F
),
highlightColor:
Color
(
0xFFDD175F
),
focusColor:
Color
(
0xFFDD175F
),
focusColor:
Color
(
0xFFDD175F
),
splashColor:
Color
(
0xFFDD175F
),
splashColor:
Color
(
0xFFDD175F
),
onTap:
()
{
onTap:
()
{
setState
(()
{
setState
(()
{
presenter
.
fav
?
presenter
.
fav
=
false
:
presenter
.
fav
?
presenter
.
fav
=
false
presenter
.
Addfav
(
widget
.
id
);
:
presenter
.
Addfav
(
widget
.
id
);
});
});
},
},
child:
ImageIcon
(
child:
ImageIcon
(
AssetImage
(
'assets/images/ic_fav_list.png'
),
AssetImage
(
'assets/images/ic_fav_list.png'
),
color:
presenter
.
fav
?
Color
(
0xFFDD175F
)
:
Colors
.
white
,
color:
presenter
.
fav
?
Color
(
0xFFDD175F
)
:
Colors
.
white
,
size:
SizeConfig
.
getFontSize
(
30
),
size:
SizeConfig
.
getFontSize
(
30
),
),
),
),),
),
),
Positioned
(
Positioned
(
left:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
top:
SizeConfig
.
getPadding
(
165
),
top:
SizeConfig
.
getPadding
(
165
),
child:
Image
.
asset
(
child:
Image
.
asset
(
'assets/images/pin_list.png'
,
'assets/images/pin_list.png'
,
width:
SizeConfig
.
getWidth
(
5
0
),
width:
SizeConfig
.
getWidth
(
6
0
),
height:
SizeConfig
.
getWidth
(
5
0
),
height:
SizeConfig
.
getWidth
(
6
0
),
),
),
),
),
Positioned
(
Positioned
(
left:
SizeConfig
.
getPadding
(
75
),
left:
SizeConfig
.
getPadding
(
80
),
top:
SizeConfig
.
getPadding
(
19
0
),
top:
SizeConfig
.
getPadding
(
20
0
),
child:
GestureDetector
(
child:
GestureDetector
(
onTap:
()
{
onTap:
()
{
print
(
presenter
.
model
.
result
[
0
].
location
);
print
(
presenter
.
model
.
result
[
0
].
location
);
List
values
=
presenter
.
model
.
result
[
0
].
location
.
split
(
","
);
// split() will split from . and gives new List with separated elements.
List
values
=
presenter
.
model
.
result
[
0
].
location
.
split
(
","
);
// split() will split from . and gives new List with separated elements.
values
.
forEach
(
print
);
values
.
forEach
(
print
);
print
(
"lat ="
+
values
[
0
]);
print
(
"lat ="
+
values
[
0
]);
print
(
"lng ="
+
values
[
1
]);
print
(
"lng ="
+
values
[
1
]);
presenter
.
gotoDirection
(
values
[
0
],
values
[
1
]);
presenter
.
gotoDirection
(
values
[
0
],
values
[
1
]);
},
},
child:
Text
(
child:
Text
(
...
@@ -194,14 +207,16 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -194,14 +207,16 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontSize:
SizeConfig
.
getFontSize
(
13
),
fontSize:
SizeConfig
.
getFontSize
(
13
),
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
),)
),
),
)),
],
],
),
),
),
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
16
),
),
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
bottom:
SizeConfig
.
getPadding
(
5
),
bottom:
SizeConfig
.
getPadding
(
5
),
...
@@ -224,7 +239,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -224,7 +239,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom:
SizeConfig
.
getPadding
(
15
)),
bottom:
SizeConfig
.
getPadding
(
15
)),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
child:
Text
(
"โทร "
+
presenter
.
model
.
result
[
0
].
phone
,
"โทร "
+
presenter
.
model
.
result
[
0
].
phone
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
grey
,
color:
Colors
.
grey
,
...
@@ -240,7 +255,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -240,7 +255,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom:
SizeConfig
.
getPadding
(
15
)),
bottom:
SizeConfig
.
getPadding
(
15
)),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
child:
Text
(
"email "
+
presenter
.
model
.
result
[
0
].
email
,
"email "
+
presenter
.
model
.
result
[
0
].
email
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
grey
,
color:
Colors
.
grey
,
...
@@ -249,7 +264,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -249,7 +264,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontWeight:
FontWeight
.
w500
),
fontWeight:
FontWeight
.
w500
),
),
),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
left:
SizeConfig
.
getPadding
(
24
),
...
@@ -257,7 +271,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -257,7 +271,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom:
SizeConfig
.
getPadding
(
15
)),
bottom:
SizeConfig
.
getPadding
(
15
)),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
child:
Text
(
"ที่อยู่ "
+
presenter
.
model
.
result
[
0
].
address
,
"ที่อยู่ "
+
presenter
.
model
.
result
[
0
].
address
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
grey
,
color:
Colors
.
grey
,
...
@@ -299,24 +313,17 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -299,24 +313,17 @@ class _ShopListDetailState extends State<ShopListDetail> {
),
),
_detail
(),
_detail
(),
_servicelist
(),
_servicelist
(),
],
],
),
),
);
);
}
}
_servicelist
()
{
_servicelist
()
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
16
),
right:
SizeConfig
.
getPadding
(
16
)
),
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
),
child:
Column
(
child:
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
15
),
top:
SizeConfig
.
getPadding
(
15
),
...
@@ -325,76 +332,103 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -325,76 +332,103 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom:
SizeConfig
.
getPadding
(
5
),
bottom:
SizeConfig
.
getPadding
(
5
),
),
),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
//
child: Text(
'บริการ'
,
//
'บริการ',
textAlign:
TextAlign
.
left
,
//
textAlign: TextAlign.left,
style:
TextStyle
(
//
style: TextStyle(
color:
Colors
.
black87
,
//
color: Colors.black87,
fontSize:
SizeConfig
.
getFontSize
(
16
),
//
fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
//
fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w700
),
//
fontWeight: FontWeight.w700),
),
//
),
),
),
Column
(
Column
(
children:
children:
List
.
generate
(
List
.
generate
(
presenter
.
model
.
result
[
0
].
openHour
.
length
,(
i
)
{
presenter
.
model
.
result
[
0
].
openHour
.
length
,
(
i
)
{
return
Column
(
children:
[
return
InkWell
(
SizedBox
(
height:
30
,),
onTap:
()
{
Navigator
.
push
(
context
,
CupertinoPageRoute
(
builder:
(
context
)
=>
MainShop
(
getid:
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
id
,
vendor_id:
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
vendorId
,
store_id:
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
storeId
,
),
),
);
},
child:
Column
(
children:
[
SizedBox
(
height:
5
,
),
Align
(
Align
(
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
child:
Text
(
presenter
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
name
,
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
name
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black87
,
color:
Colors
.
black87
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
),),
),
SizedBox
(
height:
30
,),
),
SizedBox
(
height:
16
,
),
Row
(
children:
[
Row
(
children:
[
Icon
(
Icon
(
Icons
.
timer
,
Icons
.
timer
,
color:
Colors
.
pinkAccent
,
color:
Colors
.
pinkAccent
,
size:
20
,
size:
20
,
),
),
Text
(
Text
(
" "
+
" "
+
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
duration
+
" ชม."
,
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
duration
+
" ชม."
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black87
,
color:
Colors
.
black87
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w200
),
fontWeight:
FontWeight
.
w200
),
),
Spacer
(),
),
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
specialPrice
==
null
?
Spacer
(),
Text
(
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
specialPrice
==
"฿"
+
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
price
,
null
?
Text
(
"฿"
+
presenter
.
model
.
result
[
0
].
storeProduct
[
i
]
.
product
.
price
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
red
,
color:
Colors
.
red
,
fontSize:
SizeConfig
.
getFontSize
(
18
),
fontSize:
SizeConfig
.
getFontSize
(
18
),
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
):
)
Container
(
child:
:
Container
(
child:
Row
(
Row
(
children:
[
children:
[
Icon
(
Icon
(
Icons
.
local_offer
,
Icons
.
local_offer
,
color:
Colors
.
pinkAccent
,
color:
Colors
.
pinkAccent
,
size:
20
,
size:
20
,
),
),
Text
(
Text
(
" ฿"
+
" ฿"
+
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
price
,
presenter
.
model
.
result
[
0
]
.
storeProduct
[
i
].
product
.
price
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
decoration:
TextDecoration
.
lineThrough
,
decoration:
TextDecoration
.
lineThrough
,
...
@@ -403,10 +437,14 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -403,10 +437,14 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
),
),
Text
(
Text
(
" ฿"
+
" ฿"
+
presenter
.
model
.
result
[
0
].
storeProduct
[
i
].
product
.
specialPrice
,
presenter
.
model
.
result
[
0
]
.
storeProduct
[
i
]
.
product
.
specialPrice
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
red
,
color:
Colors
.
red
,
...
@@ -414,56 +452,61 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -414,56 +452,61 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
)
)
],)
],
))
)
]),
]),
SizedBox
(
height:
20
,),
SizedBox
(
height:
10
,
),
Padding
(
Padding
(
padding:
EdgeInsets
.
fromLTRB
(
0.0
,
5.0
,
0.0
,
0.0
),
padding:
EdgeInsets
.
fromLTRB
(
0.0
,
5.0
,
0.0
,
0.0
),
child:
Material
(
//Wrap with Material
child:
Material
(
//Wrap with Material
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
30.0
)
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
30.0
)),
elevation:
0.0
,
elevation:
0.0
,
color:
Color
.
fromRGBO
(
106
,
179
,
170
,
1
),
color:
Color
(
0xff3694A3
),
clipBehavior:
Clip
.
antiAlias
,
// Add This
clipBehavior:
Clip
.
antiAlias
,
// Add This
child:
MaterialButton
(
child:
MaterialButton
(
minWidth:
MediaQuery
.
of
(
context
).
size
.
width
-
50
,
minWidth:
MediaQuery
.
of
(
context
).
size
.
width
-
50
,
height:
SizeConfig
.
getHeight
(
50
),
height:
55
,
color:
Color
(
0xff3694A3
),
color:
Color
(
0xff3694A3
),
child:
child:
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Icon
(
Icon
(
Icons
.
shopping_cart
,
Icons
.
shopping_cart
,
color:
Colors
.
white
,
color:
Colors
.
white
,
size:
25
,
size:
25
,
),
),
new
Text
(
' หยิบใส่รถเข็น'
,
new
Text
(
' หยิบใส่รถเข็น'
,
style:
new
TextStyle
(
fontSize:
16.0
,
color:
Colors
.
white
)),
style:
new
TextStyle
(
],),
fontSize:
16.0
,
color:
Colors
.
white
)),
],
),
onPressed:
()
{
onPressed:
()
{
Navigator
.
push
(
context
,
CupertinoPageRoute
(
builder:
(
context
)
=>
MyCart
(
// getid: presenter.model.result[0]
// .storeProduct[i].product.id,
// vendor_id: presenter.model.result[0].storeProduct[i]
// .product.vendorId,
// store_id: presenter.model.result[0].storeProduct[i].storeId,
),
),
);
print
(
" Go to cart"
);
print
(
" Go to cart"
);
},
},
),
),
),
),
),
),
SizedBox
(
height:
30
,),
SizedBox
(
height:
30
,
),
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
20
),
left:
SizeConfig
.
getPadding
(
20
),
...
@@ -475,15 +518,12 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -475,15 +518,12 @@ class _ShopListDetailState extends State<ShopListDetail> {
width:
MediaQuery
.
of
(
context
).
size
.
width
-
40
,
width:
MediaQuery
.
of
(
context
).
size
.
width
-
40
,
color:
Colors
.
grey
,
color:
Colors
.
grey
,
)
)
],
),
);
],);
},
},
),
),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
20
),
left:
SizeConfig
.
getPadding
(
20
),
...
@@ -495,7 +535,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -495,7 +535,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
width:
MediaQuery
.
of
(
context
).
size
.
width
-
40
,
width:
MediaQuery
.
of
(
context
).
size
.
width
-
40
,
color:
Colors
.
grey
,
color:
Colors
.
grey
,
),
),
],
],
),
),
);
);
...
@@ -522,8 +561,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -522,8 +561,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
),
),
),
),
Container
(
Container
(
height:
200
,
height:
200
,
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
...
@@ -533,11 +570,11 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -533,11 +570,11 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom:
SizeConfig
.
getPadding
(
5
),
bottom:
SizeConfig
.
getPadding
(
5
),
),
),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
physics:
const
NeverScrollableScrollPhysics
(),
itemCount:
presenter
.
model
.
result
[
0
].
openHour
.
length
,
itemCount:
presenter
.
model
.
result
[
0
].
openHour
.
length
,
itemBuilder:
(
context
,
i
)
{
itemBuilder:
(
context
,
i
)
{
return
return
Text
(
Text
(
"
${presenter.model.result[0].openHour[i].name}
${presenter.model.result[0].openHour[i].open}
-
${presenter.model.result[0].openHour[i].closed}
"
,
"
${presenter.model.result[0].openHour[i].name}
${presenter.model.result[0].openHour[i].open}
-
${presenter.model.result[0].openHour[i].closed}
"
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
...
@@ -545,12 +582,10 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -545,12 +582,10 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
fontWeight:
FontWeight
.
w500
),
);
);
},
},
),
),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
20
),
left:
SizeConfig
.
getPadding
(
20
),
...
@@ -754,7 +789,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -754,7 +789,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
left:
SizeConfig
.
getPadding
(
20
),
left:
SizeConfig
.
getPadding
(
20
),
right:
SizeConfig
.
getPadding
(
20
),
right:
SizeConfig
.
getPadding
(
20
),
top:
SizeConfig
.
getPadding
(
40
),
top:
SizeConfig
.
getPadding
(
40
),
bottom:
SizeConfig
.
getPadding
(
2
0
),
bottom:
SizeConfig
.
getPadding
(
1
0
),
),
),
height:
SizeConfig
.
getHeight
(
1
),
height:
SizeConfig
.
getHeight
(
1
),
width:
MediaQuery
.
of
(
context
).
size
.
width
-
40
,
width:
MediaQuery
.
of
(
context
).
size
.
width
-
40
,
...
...
lib/ui/shop/shop_main.dart
View file @
f97a4ff7
...
@@ -9,12 +9,14 @@ import 'package:flutter/material.dart';
...
@@ -9,12 +9,14 @@ import 'package:flutter/material.dart';
import
'dart:math'
;
import
'dart:math'
;
class
MainShop
extends
StatefulWidget
{
class
MainShop
extends
StatefulWidget
{
int
getid
;
int
getid
;
int
vendor_id
;
int
vendor_id
;
int
store_id
;
int
store_id
;
MainShop
({
Key
key
,
this
.
title
,
this
.
getid
,
this
.
vendor_id
,
this
.
store_id
})
:
super
(
key:
key
);
MainShop
({
Key
key
,
this
.
title
,
this
.
getid
,
this
.
vendor_id
,
this
.
store_id
})
:
super
(
key:
key
);
final
String
title
;
final
String
title
;
...
@@ -285,7 +287,7 @@ class _MainShopState extends State<MainShop>
...
@@ -285,7 +287,7 @@ class _MainShopState extends State<MainShop>
child:
Container
(
child:
Container
(
// color: Colors.blue,
// color: Colors.blue,
// height: double.maxFinite,
// height: double.maxFinite,
child:
ShopServicePage
(),
child:
ShopServicePage
(
getid:
widget
.
getid
,
vendor_id:
widget
.
vendor_id
,
store_id:
widget
.
store_id
,
),
),
),
),
),
],
],
...
@@ -295,7 +297,7 @@ class _MainShopState extends State<MainShop>
...
@@ -295,7 +297,7 @@ class _MainShopState extends State<MainShop>
Container
(
Container
(
// color: Colors.red,
// color: Colors.red,
child:
ShopReviewsPage
(),
child:
ShopReviewsPage
(
getid:
widget
.
getid
,
vendor_id:
widget
.
vendor_id
,
store_id:
widget
.
store_id
,
),
// child: getlist(),
// child: getlist(),
//width: 20,
//width: 20,
),
),
...
...
lib/ui/shop/shop_reviews.dart
View file @
f97a4ff7
...
@@ -3,8 +3,19 @@ import 'package:feelverapp/util/rating_star.dart';
...
@@ -3,8 +3,19 @@ import 'package:feelverapp/util/rating_star.dart';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
class
ShopReviewsPage
extends
StatefulWidget
{
class
ShopReviewsPage
extends
StatefulWidget
{
int
getid
;
int
vendor_id
;
int
store_id
;
ShopReviewsPage
({
Key
key
,
this
.
getid
,
this
.
vendor_id
,
this
.
store_id
})
:
super
(
key:
key
);
@override
@override
_ShopReviewsPageState
createState
()
=>
_ShopReviewsPageState
();
_ShopReviewsPageState
createState
()
=>
_ShopReviewsPageState
();
// setState(() {
// presenter.vendor_id = widget.vendor_id;
// presenter.store_id = widget.store_id;
// presenter.getid = widget.getid;
// });
}
}
class
_ShopReviewsPageState
extends
State
<
ShopReviewsPage
>
{
class
_ShopReviewsPageState
extends
State
<
ShopReviewsPage
>
{
...
...
lib/ui/shop/shop_service.dart
View file @
f97a4ff7
...
@@ -9,6 +9,13 @@ import '../booking/booking_detail.dart';
...
@@ -9,6 +9,13 @@ import '../booking/booking_detail.dart';
import
'shop_main.dart'
;
import
'shop_main.dart'
;
class
ShopServicePage
extends
StatefulWidget
{
class
ShopServicePage
extends
StatefulWidget
{
int
getid
;
int
vendor_id
;
int
store_id
;
ShopServicePage
({
Key
key
,
this
.
getid
,
this
.
vendor_id
,
this
.
store_id
})
:
super
(
key:
key
);
@override
@override
_ShopServicePageState
createState
()
=>
_ShopServicePageState
();
_ShopServicePageState
createState
()
=>
_ShopServicePageState
();
}
}
...
@@ -24,6 +31,12 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -24,6 +31,12 @@ class _ShopServicePageState extends State<ShopServicePage>
super
.
initState
();
super
.
initState
();
presenter
=
ShopServicePresenter
(
this
);
presenter
=
ShopServicePresenter
(
this
);
setState
(()
{
presenter
.
vendor_id
=
widget
.
vendor_id
;
presenter
.
store_id
=
widget
.
store_id
;
presenter
.
getid
=
widget
.
getid
;
});
presenter
.
Servicelistitem
();
presenter
.
Servicelistitem
();
}
}
...
@@ -35,15 +48,28 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -35,15 +48,28 @@ class _ShopServicePageState extends State<ShopServicePage>
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
SizeConfig
(
context
);
SizeConfig
(
context
);
return
Container
(
child:
presenter
.
serviceModel
==
null
return
presenter
.
serviceModel
==
null
?
Container
(
child:
Center
(
child:
CircularProgressIndicator
(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
Colors
.
teal
),
),
),
)
:
Container
(
child:
presenter
.
serviceModel
.
data
==
null
?
Container
()
?
Container
()
:
ListView
.
builder
(
:
ListView
.
builder
(
itemCount:
presenter
.
serviceModel
.
data
.
length
,
itemCount:
presenter
.
serviceModel
.
data
.
length
,
itemBuilder:
(
context
,
i
)
{
itemBuilder:
(
context
,
i
)
{
// print(presenter.serviceModel.data.length);
return
myCard
(
return
myCard
(
presenter
.
serviceModel
.
data
[
i
].
name
,
presenter
.
serviceModel
.
data
[
i
].
name
,
presenter
.
serviceModel
.
data
[
i
].
cover
,
presenter
.
serviceModel
.
data
[
i
].
cover
==
null
?
"https://heart.kku.ac.th/media/tz_portfolio_plus/article/cache/dujdao-sahasthas-2-14_o.png"
:
presenter
.
serviceModel
.
data
[
i
].
cover
,
presenter
.
serviceModel
.
data
[
i
].
excerpt
,
presenter
.
serviceModel
.
data
[
i
].
price
,
presenter
.
serviceModel
.
data
[
i
].
price
,
presenter
.
serviceModel
.
data
[
i
].
duration
,
presenter
.
serviceModel
.
data
[
i
].
duration
,
presenter
.
serviceModel
.
data
[
i
].
id
,
presenter
.
serviceModel
.
data
[
i
].
id
,
...
@@ -58,8 +84,8 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -58,8 +84,8 @@ class _ShopServicePageState extends State<ShopServicePage>
);
);
}
}
Widget
myCard
(
String
title
,
String
image
,
String
price
,
String
time
,
int
id
,
Widget
myCard
(
String
title
,
String
image
,
String
detail
,
String
price
,
String
special_price
,
int
vendor_id
,
int
store_id
)
{
String
time
,
int
id
,
String
special_price
,
int
vendor_id
,
int
store_id
)
{
return
InkWell
(
return
InkWell
(
onTap:
()
{
onTap:
()
{
setState
(
setState
(
...
@@ -68,8 +94,9 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -68,8 +94,9 @@ class _ShopServicePageState extends State<ShopServicePage>
context
,
context
,
CupertinoPageRoute
(
CupertinoPageRoute
(
builder:
(
context
)
=>
MainShop
(
builder:
(
context
)
=>
MainShop
(
getid:
id
,
vendor_id:
vendor_id
,
store_id:
store_id
,
getid:
id
,
vendor_id:
vendor_id
,
store_id:
store_id
,
),
),
),
),
);
);
...
@@ -96,7 +123,7 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -96,7 +123,7 @@ class _ShopServicePageState extends State<ShopServicePage>
// color: Colors.blue,
// color: Colors.blue,
height:
SizeConfig
.
getHeight
(
250
),
height:
SizeConfig
.
getHeight
(
250
),
child:
presenter
.
serviceModel
==
null
child:
presenter
.
serviceModel
==
null
?
Image
.
asset
(
?
Image
.
network
(
"assets/images/demo_img.png"
,
"assets/images/demo_img.png"
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)
)
...
@@ -133,12 +160,12 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -133,12 +160,12 @@ class _ShopServicePageState extends State<ShopServicePage>
height:
5
,
height:
5
,
),
),
Text
(
Text
(
"SPA Cenvaree @ Centara Grand CentralWorld Bangkok"
,
detail
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xff969696
),
color:
Color
(
0xff969696
),
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
fontWeight:
FontWeight
.
w500
),
maxLines:
3
,
),
),
],
],
),
),
...
@@ -149,30 +176,28 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -149,30 +176,28 @@ class _ShopServicePageState extends State<ShopServicePage>
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
Row
(
// Row(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
// crossAxisAlignment: CrossAxisAlignment.center,
children:
<
Widget
>[
// children: <Widget>[
Image
.
asset
(
// Image.asset(
'assets/images/pin_drop.png'
,
// 'assets/images/pin_drop.png',
height:
20
,
// height: 20,
width:
20
,
// width: 20,
),
// ),
SizedBox
(
// SizedBox(
width:
5
,
// width: 5,
),
// ),
Text
(
// Text(
"พญาไท กรุงเทพฯ"
,
// addres,
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
13
),
// fontSize: SizeConfig.getFontSize(13),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
),
// ),
),
// ),
],
// ],
),
// ),
SizedBox
(
height:
10
,
),
Row
(
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
children:
<
Widget
>[
...
...
lib/ui/shop/shop_service_presenter.dart
View file @
f97a4ff7
...
@@ -6,6 +6,10 @@ import 'package:flutter/material.dart';
...
@@ -6,6 +6,10 @@ import 'package:flutter/material.dart';
class
ShopServicePresenter
extends
BasePresenter
<
ShopServicePage
>
{
class
ShopServicePresenter
extends
BasePresenter
<
ShopServicePage
>
{
Api
_api
;
Api
_api
;
int
getid
;
int
vendor_id
;
int
store_id
;
final
formkey
=
GlobalKey
<
FormState
>();
final
formkey
=
GlobalKey
<
FormState
>();
shopserviceModel
serviceModel
;
shopserviceModel
serviceModel
;
...
@@ -13,20 +17,17 @@ class ShopServicePresenter extends BasePresenter<ShopServicePage> {
...
@@ -13,20 +17,17 @@ class ShopServicePresenter extends BasePresenter<ShopServicePage> {
Servicelistitem
()
async
{
Servicelistitem
()
async
{
_api
=
Api
<
shopserviceModel
>();
_api
=
Api
<
shopserviceModel
>();
var
res
=
await
_api
.
shopservice
({
var
res
=
await
_api
.
shopservice
(
"vendor_id"
:
"9"
,
'https://backend-uat.feelver.com/api/product/getListsProductFormat?vendor_id='
+
"store_id"
:
"284"
,
vendor_id
.
toString
()
+
"is_paginate"
:
"1"
,
'&store_id='
+
"per_page"
:
"1"
,
store_id
.
toString
()
+
"v"
:
"1"
,
'&is_paginate=1&per_page=99&v=1'
);
});
if
(
res
.
fail
==
null
)
{
if
(
res
.
fail
==
null
)
{
setState
(()
{
setState
(()
{
serviceModel
=
res
.
success
;
serviceModel
=
res
.
success
;
print
(
"sssssssssssss"
);
print
(
'
${serviceModel.data[1].name}
'
);
print
(
'
${serviceModel.data[0].name}
'
);
});
});
}
else
{
}
else
{
print
(
'res Fail'
);
print
(
'res Fail'
);
...
...
pubspec.lock
View file @
f97a4ff7
...
@@ -99,6 +99,13 @@ packages:
...
@@ -99,6 +99,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "5.2.1"
version: "5.2.1"
firebase_crashlytics:
dependency: "direct main"
description:
name: firebase_crashlytics
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4+1"
flutter:
flutter:
dependency: "direct main"
dependency: "direct main"
description: flutter
description: flutter
...
...
pubspec.yaml
View file @
f97a4ff7
...
@@ -37,6 +37,7 @@ dependencies:
...
@@ -37,6 +37,7 @@ dependencies:
date_format
:
^1.0.8
date_format
:
^1.0.8
flutter_datetime_picker
:
^1.4.0
flutter_datetime_picker
:
^1.4.0
carousel_slider
:
^2.2.1
carousel_slider
:
^2.2.1
firebase_crashlytics
:
^0.1.4+1
...
...
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