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
db3a7fcf
Commit
db3a7fcf
authored
Aug 25, 2020
by
Mobile : Art
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9e266a4a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
396 additions
and
244 deletions
+396
-244
lib/model/booking_detail/booking_detail_model.dart
+239
-95
lib/service/api.dart
+6
-7
lib/ui/booking/booking_detail.dart
+127
-126
lib/ui/booking/booking_detail_presenter.dart
+7
-3
lib/ui/shop/shop_main.dart
+4
-3
lib/ui/shop/shop_service.dart
+5
-2
lib/ui/shop/shop_service_presenter.dart
+4
-4
pubspec.lock
+3
-3
pubspec.yaml
+1
-1
No files found.
lib/model/booking_detail/booking_detail_model.dart
View file @
db3a7fcf
...
...
@@ -21,74 +21,6 @@ class ProductModel {
}
class
Results
{
int
currentPage
;
List
<
Data
>
data
;
String
firstPageUrl
;
int
from
;
int
lastPage
;
String
lastPageUrl
;
String
nextPageUrl
;
String
path
;
int
perPage
;
Null
prevPageUrl
;
int
to
;
int
total
;
Results
(
{
this
.
currentPage
,
this
.
data
,
this
.
firstPageUrl
,
this
.
from
,
this
.
lastPage
,
this
.
lastPageUrl
,
this
.
nextPageUrl
,
this
.
path
,
this
.
perPage
,
this
.
prevPageUrl
,
this
.
to
,
this
.
total
});
Results
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
currentPage
=
json
[
'current_page'
];
if
(
json
[
'data'
]
!=
null
)
{
data
=
new
List
<
Data
>();
json
[
'data'
].
forEach
((
v
)
{
data
.
add
(
new
Data
.
fromJson
(
v
));
});
}
firstPageUrl
=
json
[
'first_page_url'
];
from
=
json
[
'from'
];
lastPage
=
json
[
'last_page'
];
lastPageUrl
=
json
[
'last_page_url'
];
nextPageUrl
=
json
[
'next_page_url'
];
path
=
json
[
'path'
];
perPage
=
json
[
'per_page'
];
prevPageUrl
=
json
[
'prev_page_url'
];
to
=
json
[
'to'
];
total
=
json
[
'total'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'current_page'
]
=
this
.
currentPage
;
if
(
this
.
data
!=
null
)
{
data
[
'data'
]
=
this
.
data
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'first_page_url'
]
=
this
.
firstPageUrl
;
data
[
'from'
]
=
this
.
from
;
data
[
'last_page'
]
=
this
.
lastPage
;
data
[
'last_page_url'
]
=
this
.
lastPageUrl
;
data
[
'next_page_url'
]
=
this
.
nextPageUrl
;
data
[
'path'
]
=
this
.
path
;
data
[
'per_page'
]
=
this
.
perPage
;
data
[
'prev_page_url'
]
=
this
.
prevPageUrl
;
data
[
'to'
]
=
this
.
to
;
data
[
'total'
]
=
this
.
total
;
return
data
;
}
}
class
Data
{
int
id
;
String
urlCode
;
String
name
;
...
...
@@ -99,7 +31,7 @@ class Data {
String
specialPrice
;
String
sku
;
Null
tax
;
Null
quantity
;
int
quantity
;
Null
weight
;
String
visibility
;
Null
newsFromDate
;
...
...
@@ -122,22 +54,38 @@ class Data {
String
crossSellsStatus
;
String
allowGiftMessage
;
String
stockStatus
;
String
status
;
int
status
;
int
businessTypeId
;
int
businessCateId
;
int
businessServiceId
;
Null
businessServiceId
;
int
attributeSetId
;
int
vendorId
;
String
allowRoute
;
String
type
;
List
<
Null
>
promotions
;
Null
type
;
int
star
;
List
<
StoresByVendorId
>
storesByVendorId
;
List
<
Null
>
images
;
List
<
CategoryByProductId
>
categoryByProductId
;
List
<
Null
>
ratings
;
List
<
Null
>
comments
;
List
<
Null
>
vendorRoute
;
List
<
Null
>
commentReview
;
int
storeProductId
;
Null
typeRateService
;
Null
priceRateService
;
int
productId
;
int
storeId
;
String
storeCode
;
String
storeName
;
String
location
;
int
storeStatus
;
int
vendorStatus
;
String
latitude
;
String
longitude
;
Null
popular
;
List
<
Null
>
promotions
;
List
<
Null
>
wishList
;
Data
(
Results
(
{
this
.
id
,
this
.
urlCode
,
this
.
name
,
...
...
@@ -179,14 +127,30 @@ class Data {
this
.
vendorId
,
this
.
allowRoute
,
this
.
type
,
this
.
promotions
,
this
.
star
,
this
.
storesByVendorId
,
this
.
images
,
this
.
categoryByProductId
,
this
.
ratings
,
this
.
comments
,
this
.
vendorRoute
});
this
.
commentReview
,
this
.
storeProductId
,
this
.
typeRateService
,
this
.
priceRateService
,
this
.
productId
,
this
.
storeId
,
this
.
storeCode
,
this
.
storeName
,
this
.
location
,
this
.
storeStatus
,
this
.
vendorStatus
,
this
.
latitude
,
this
.
longitude
,
this
.
popular
,
this
.
promotions
,
this
.
wishList
});
Data
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
Results
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
urlCode
=
json
[
'url_code'
];
name
=
json
[
'name'
];
...
...
@@ -228,13 +192,19 @@ class Data {
vendorId
=
json
[
'vendor_id'
];
allowRoute
=
json
[
'allow_route'
];
type
=
json
[
'type'
];
// if (json['promotions'] != null) {
// promotions = new List<Null>();
// json['promotions'].forEach((v) {
// promotions.add(new Null.fromJson(v));
star
=
json
[
'star'
];
if
(
json
[
'stores_by_vendor_id'
]
!=
null
)
{
storesByVendorId
=
new
List
<
StoresByVendorId
>();
json
[
'stores_by_vendor_id'
].
forEach
((
v
)
{
storesByVendorId
.
add
(
new
StoresByVendorId
.
fromJson
(
v
));
});
}
// if (json['images'] != null) {
// images = new List<Null>();
// json['images'].forEach((v) {
// images.add(new Null.fromJson(v));
// });
// }
star
=
json
[
'star'
];
if
(
json
[
'category_by_product_id'
]
!=
null
)
{
categoryByProductId
=
new
List
<
CategoryByProductId
>();
json
[
'category_by_product_id'
].
forEach
((
v
)
{
...
...
@@ -253,10 +223,35 @@ class Data {
// comments.add(new Null.fromJson(v));
// });
// }
// if (json['vendor_route'] != null) {
// vendorRoute = new List<Null>();
// json['vendor_route'].forEach((v) {
// vendorRoute.add(new Null.fromJson(v));
// if (json['comment_review'] != null) {
// commentReview = new List<Null>();
// json['comment_review'].forEach((v) {
// commentReview.add(new Null.fromJson(v));
// });
// }
storeProductId
=
json
[
'store_product_id'
];
typeRateService
=
json
[
'type_rate_service'
];
priceRateService
=
json
[
'price_rate_service'
];
productId
=
json
[
'product_id'
];
storeId
=
json
[
'store_id'
];
storeCode
=
json
[
'store_code'
];
storeName
=
json
[
'store_name'
];
location
=
json
[
'location'
];
storeStatus
=
json
[
'store_status'
];
vendorStatus
=
json
[
'vendor_status'
];
latitude
=
json
[
'latitude'
];
longitude
=
json
[
'longitude'
];
popular
=
json
[
'popular'
];
// if (json['promotions'] != null) {
// promotions = new List<Null>();
// json['promotions'].forEach((v) {
// promotions.add(new Null.fromJson(v));
// });
// }
// if (json['wishList'] != null) {
// wishList = new List<Null>();
// json['wishList'].forEach((v) {
// wishList.add(new Null.fromJson(v));
// });
// }
}
...
...
@@ -304,10 +299,14 @@ class Data {
data
[
'vendor_id'
]
=
this
.
vendorId
;
data
[
'allow_route'
]
=
this
.
allowRoute
;
data
[
'type'
]
=
this
.
type
;
// if (this.promotions != null) {
// data['promotions'] = this.promotions.map((v) => v.toJson()).toList();
// }
data
[
'star'
]
=
this
.
star
;
if
(
this
.
storesByVendorId
!=
null
)
{
data
[
'stores_by_vendor_id'
]
=
this
.
storesByVendorId
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
// if (this.images != null) {
// data['images'] = this.images.map((v) => v.toJson()).toList();
// }
if
(
this
.
categoryByProductId
!=
null
)
{
data
[
'category_by_product_id'
]
=
this
.
categoryByProductId
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
...
...
@@ -318,16 +317,161 @@ class Data {
// if (this.comments != null) {
// data['comments'] = this.comments.map((v) => v.toJson()).toList();
// }
// if (this.vendorRoute != null) {
// data['vendor_route'] = this.vendorRoute.map((v) => v.toJson()).toList();
// if (this.commentReview != null) {
// data['comment_review'] =
// this.commentReview.map((v) => v.toJson()).toList();
// }
data
[
'store_product_id'
]
=
this
.
storeProductId
;
data
[
'type_rate_service'
]
=
this
.
typeRateService
;
data
[
'price_rate_service'
]
=
this
.
priceRateService
;
data
[
'product_id'
]
=
this
.
productId
;
data
[
'store_id'
]
=
this
.
storeId
;
data
[
'store_code'
]
=
this
.
storeCode
;
data
[
'store_name'
]
=
this
.
storeName
;
data
[
'location'
]
=
this
.
location
;
data
[
'store_status'
]
=
this
.
storeStatus
;
data
[
'vendor_status'
]
=
this
.
vendorStatus
;
data
[
'latitude'
]
=
this
.
latitude
;
data
[
'longitude'
]
=
this
.
longitude
;
data
[
'popular'
]
=
this
.
popular
;
// if (this.promotions != null) {
// data['promotions'] = this.promotions.map((v) => v.toJson()).toList();
// }
// if (this.wishList != null) {
// data['wishList'] = this.wishList.map((v) => v.toJson()).toList();
// }
return
data
;
}
}
class
StoresByVendorId
{
int
id
;
String
storeCode
;
String
storeName
;
String
storeCover
;
String
displayCover
;
String
isActive
;
int
storeOrder
;
int
customerGroupId
;
int
vendorId
;
Null
createdAt
;
String
updatedAt
;
String
location
;
String
email
;
String
phone
;
String
mobile
;
String
address
;
String
city
;
String
country
;
String
zipCode
;
String
website
;
String
allowRoute
;
String
excerpt
;
String
detail
;
String
storeLogo
;
String
isFacilities
;
String
distanceWithLocation
;
int
star
;
Null
ratings
;
StoresByVendorId
(
{
this
.
id
,
this
.
storeCode
,
this
.
storeName
,
this
.
storeCover
,
this
.
displayCover
,
this
.
isActive
,
this
.
storeOrder
,
this
.
customerGroupId
,
this
.
vendorId
,
this
.
createdAt
,
this
.
updatedAt
,
this
.
location
,
this
.
email
,
this
.
phone
,
this
.
mobile
,
this
.
address
,
this
.
city
,
this
.
country
,
this
.
zipCode
,
this
.
website
,
this
.
allowRoute
,
this
.
excerpt
,
this
.
detail
,
this
.
storeLogo
,
this
.
isFacilities
,
this
.
distanceWithLocation
,
this
.
star
,
this
.
ratings
});
StoresByVendorId
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
storeCode
=
json
[
'store_code'
];
storeName
=
json
[
'store_name'
];
storeCover
=
json
[
'store_cover'
];
displayCover
=
json
[
'display_cover'
];
isActive
=
json
[
'is_active'
];
storeOrder
=
json
[
'store_order'
];
customerGroupId
=
json
[
'customer_group_id'
];
vendorId
=
json
[
'vendor_id'
];
createdAt
=
json
[
'created_at'
];
updatedAt
=
json
[
'updated_at'
];
location
=
json
[
'location'
];
email
=
json
[
'email'
];
phone
=
json
[
'phone'
];
mobile
=
json
[
'mobile'
];
address
=
json
[
'address'
];
city
=
json
[
'city'
];
country
=
json
[
'country'
];
zipCode
=
json
[
'zip_code'
];
website
=
json
[
'website'
];
allowRoute
=
json
[
'allow_route'
];
excerpt
=
json
[
'excerpt'
];
detail
=
json
[
'detail'
];
storeLogo
=
json
[
'store_logo'
];
isFacilities
=
json
[
'is_facilities'
];
distanceWithLocation
=
json
[
'distance_with_location'
];
star
=
json
[
'star'
];
ratings
=
json
[
'ratings'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'id'
]
=
this
.
id
;
data
[
'store_code'
]
=
this
.
storeCode
;
data
[
'store_name'
]
=
this
.
storeName
;
data
[
'store_cover'
]
=
this
.
storeCover
;
data
[
'display_cover'
]
=
this
.
displayCover
;
data
[
'is_active'
]
=
this
.
isActive
;
data
[
'store_order'
]
=
this
.
storeOrder
;
data
[
'customer_group_id'
]
=
this
.
customerGroupId
;
data
[
'vendor_id'
]
=
this
.
vendorId
;
data
[
'created_at'
]
=
this
.
createdAt
;
data
[
'updated_at'
]
=
this
.
updatedAt
;
data
[
'location'
]
=
this
.
location
;
data
[
'email'
]
=
this
.
email
;
data
[
'phone'
]
=
this
.
phone
;
data
[
'mobile'
]
=
this
.
mobile
;
data
[
'address'
]
=
this
.
address
;
data
[
'city'
]
=
this
.
city
;
data
[
'country'
]
=
this
.
country
;
data
[
'zip_code'
]
=
this
.
zipCode
;
data
[
'website'
]
=
this
.
website
;
data
[
'allow_route'
]
=
this
.
allowRoute
;
data
[
'excerpt'
]
=
this
.
excerpt
;
data
[
'detail'
]
=
this
.
detail
;
data
[
'store_logo'
]
=
this
.
storeLogo
;
data
[
'is_facilities'
]
=
this
.
isFacilities
;
data
[
'distance_with_location'
]
=
this
.
distanceWithLocation
;
data
[
'star'
]
=
this
.
star
;
data
[
'ratings'
]
=
this
.
ratings
;
return
data
;
}
}
class
CategoryByProductId
{
int
id
;
int
parentId
;
Null
parentId
;
String
name
;
String
code
;
String
displayName
;
...
...
@@ -336,8 +480,8 @@ class CategoryByProductId {
Null
type
;
String
status
;
int
sortOrder
;
int
storeId
;
int
vendorId
;
Null
storeId
;
Null
vendorId
;
Null
createdAt
;
String
updatedAt
;
String
visibility
;
...
...
lib/service/api.dart
View file @
db3a7fcf
...
...
@@ -38,11 +38,8 @@ class Api<T> {
static
final
String
baseApi
=
"https://backend-uat.feelver.com/api"
;
<<<<<<<
HEAD
static
final
String
baseApiforimage
=
"https://backend.feelver.com/storage/"
;
=======
static
final
String
baseApiforimage
=
"https://backend-uat.feelver.com/api/storage/"
;
Future
<
Response
<
T
>>
reviewshop
(
Object
body
)
async
{
...
...
@@ -62,7 +59,6 @@ class Api<T> {
});
return
result
;
}
>>>>>>>
baadf91b2b909230e56f29edefbed7cfd2f5e949
Future
<
Response
<
T
>>
deletefavorite
(
Object
body
)
async
{
...
...
@@ -109,7 +105,10 @@ class Api<T> {
var
result
;
print
(
"this is body"
+
body
.
toString
());
// (body as Map)['lang'] = allTranslations.currentLanguage;
await
_httpConnection
(
"
${this._baseApi}
/product/getListsProductFormat?vendor_id=16&store_id=406&is_paginate=1&per_page=8&v=2"
,
this
.
_headerApi
,
null
)
await
_httpConnection
(
"
${this._baseApi}
/product/getListsProductFormat?vendor_id=9&store_id=284&is_paginate=1&per_page=1&v=1"
,
this
.
_headerApi
,
null
)
.
then
((
response
){
print
(
"ผลลัพท์ เท่ากับ"
+
"
${response.body}
"
);
if
(
response
.
statusCode
==
200
){
...
...
@@ -199,7 +198,7 @@ class Api<T> {
print
(
"this is body "
+
body
.
toString
());
// (body as Map)['lang'] = allTranslations.currentLanguage;
await
http
.
get
(
Uri
.
encodeFull
(
"https://backend.feelver.com/api/p
ortal/product/?id=5
"
),
headers:
this
.
_headerApi
).
then
((
response
)
{
await
http
.
get
(
Uri
.
encodeFull
(
"https://backend.feelver.com/api/p
roduct/1000?store_id=284&vendor_id=9
"
),
headers:
this
.
_headerApi
).
then
((
response
)
{
print
(
"ผลลัพ เท่ากับบบบ2 "
+
"
${response.body}
"
);
print
(
"statusCode=
${response.statusCode}
"
);
if
(
response
.
statusCode
==
200
)
{
...
...
lib/ui/booking/booking_detail.dart
View file @
db3a7fcf
...
...
@@ -9,11 +9,9 @@ import '../splashscreen/splash_screen_page.dart';
class
BookingDetail
extends
StatefulWidget
{
int
getid
;
BookingDetail
(
{
Key
key
,
this
.
getid
})
:
super
(
key:
key
);
int
vendor_id
;
int
store_id
;
BookingDetail
({
Key
key
,
this
.
getid
,
this
.
vendor_id
,
this
.
store_id
})
:
super
(
key:
key
);
@override
_BookingDetailState
createState
()
=>
_BookingDetailState
();
...
...
@@ -30,10 +28,8 @@ class _BookingDetailState extends State<BookingDetail> {
presenter
=
BookingDetailtPresenter
(
this
);
setState
(()
{
presenter
.
getid
=
widget
.
getid
;
});
presenter
.
getDetail
();
}
@override
...
...
@@ -67,7 +63,7 @@ class _BookingDetailState extends State<BookingDetail> {
children:
<
Widget
>[
Stack
(
children:
<
Widget
>[
presenter
.
getmodel
.
results
.
data
[
0
].
cover
==
null
presenter
.
getmodel
.
results
.
cover
==
null
?
Image
.
asset
(
'assets/images/demo_img.png'
,
width:
SizeConfig
.
getWidth
(
110
),
...
...
@@ -75,45 +71,15 @@ class _BookingDetailState extends State<BookingDetail> {
fit:
BoxFit
.
fitWidth
,
)
:
Image
.
network
(
presenter
.
getmodel
.
results
.
data
[
0
].
cover
,
presenter
.
getmodel
.
results
.
cover
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
SizeConfig
.
getHeight
(
450
),
fit:
BoxFit
.
cover
,
),
],
),
presenter
.
getmodel
.
results
.
data
[
0
].
duration
==
null
?
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
top:
SizeConfig
.
getPadding
(
16
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
''
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
)
:
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
top:
SizeConfig
.
getPadding
(
16
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
presenter
.
getmodel
.
results
.
data
[
0
].
duration
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
),
presenter
.
getmodel
.
results
.
data
[
0
].
name
==
null
presenter
.
getmodel
.
results
.
name
==
null
?
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
...
...
@@ -136,7 +102,7 @@ class _BookingDetailState extends State<BookingDetail> {
bottom:
SizeConfig
.
getPadding
(
16
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
presenter
.
getmodel
.
results
.
data
[
0
].
name
,
presenter
.
getmodel
.
results
.
name
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black
,
...
...
@@ -152,7 +118,7 @@ class _BookingDetailState extends State<BookingDetail> {
),
ImageIcon
(
AssetImage
(
'assets/images/ic_fav_active.png'
),
color:
Colors
.
pink
,
color:
Colors
.
grey
,
size:
SizeConfig
.
getFontSize
(
24
),
),
SizedBox
(
...
...
@@ -161,7 +127,7 @@ class _BookingDetailState extends State<BookingDetail> {
Container
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
'
7
0'
,
'0'
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black54
,
...
...
@@ -188,7 +154,7 @@ class _BookingDetailState extends State<BookingDetail> {
Container
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
'
7
0'
,
'0'
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black54
,
...
...
@@ -228,10 +194,11 @@ class _BookingDetailState extends State<BookingDetail> {
right:
SizeConfig
.
getPadding
(
24
),
),
),
presenter
.
getmodel
.
results
.
data
[
0
].
detail
==
null
presenter
.
getmodel
.
results
.
excerpt
==
null
?
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
top:
SizeConfig
.
getPadding
(
16
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
...
...
@@ -247,11 +214,11 @@ class _BookingDetailState extends State<BookingDetail> {
:
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
top:
SizeConfig
.
getPadding
(
16
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
Util
.
removeHTMLTag
(
'
${presenter.getmodel.results.data[0].detail}
'
),
Util
.
removeHTMLTag
(
'
${presenter.getmodel.results.excerpt}
'
),
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black54
,
...
...
@@ -260,49 +227,49 @@ class _BookingDetailState extends State<BookingDetail> {
fontWeight:
FontWeight
.
w500
),
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
24
),
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
)),
child:
Text
(
'Thai Body Balance 60 นาที'
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black87
,
fontSize:
SizeConfig
.
getFontSize
(
20
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
),
//
Container(
//
alignment: Alignment.topLeft,
//
padding: EdgeInsets.only(
//
top: SizeConfig.getPadding(24),
//
left: SizeConfig.getPadding(24),
//
right: SizeConfig.getPadding(24)),
//
child: Text(
//
'Thai Body Balance 60 นาที',
//
textAlign: TextAlign.left,
//
style: TextStyle(
//
color: Colors.black87,
//
fontSize: SizeConfig.getFontSize(20),
//
fontFamily: "SF_Pro_Text",
//
fontWeight: FontWeight.w500),
//
),
//
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
10
),
),
Row
(
children:
<
Widget
>[
SizedBox
(
width:
SizeConfig
.
getWidth
(
24
),
),
Image
.
asset
(
'assets/images/clock.png'
,
width:
SizeConfig
.
getWidth
(
20
),
height:
SizeConfig
.
getWidth
(
20
),
),
SizedBox
(
width:
SizeConfig
.
getWidth
(
10
),
),
Text
(
'150 นาที'
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black87
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
],
height:
SizeConfig
.
getHeight
(
16
),
),
// Row(
// children: <Widget>[
// SizedBox(
// width: SizeConfig.getWidth(24),
// ),
// Image.asset(
// 'assets/images/clock.png',
// width: SizeConfig.getWidth(20),
// height: SizeConfig.getWidth(20),
// ),
// SizedBox(
// width: SizeConfig.getWidth(10),
// ),
// Text(
// '150 นาที',
// textAlign: TextAlign.left,
// style: TextStyle(
// color: Colors.black87,
// fontSize: SizeConfig.getFontSize(12),
// fontFamily: "SF_Pro_Text",
// fontWeight: FontWeight.w500),
// ),
// ],
// ),
Stack
(
children:
<
Widget
>[
Container
(
...
...
@@ -334,43 +301,77 @@ class _BookingDetailState extends State<BookingDetail> {
bottom:
SizeConfig
.
getPadding
(
20
),
),
),
Container
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
'฿199.00'
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Color
.
fromRGBO
(
255
,
0
,
0
,
1
),
fontSize:
SizeConfig
.
getFontSize
(
26
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
90
),
presenter
.
getmodel
.
results
.
specialPrice
==
null
?
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
top:
SizeConfig
.
getPadding
(
16
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
''
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
)
:
Container
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
presenter
.
getmodel
.
results
.
specialPrice
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Color
.
fromRGBO
(
255
,
0
,
0
,
1
),
fontSize:
SizeConfig
.
getFontSize
(
26
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
90
),
// right: SizeConfig.getPadding(20),
top:
SizeConfig
.
getPadding
(
10
),
bottom:
SizeConfig
.
getPadding
(
20
),
),
),
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
90
),
top:
SizeConfig
.
getPadding
(
10
),
bottom:
SizeConfig
.
getPadding
(
20
),
),
),
presenter
.
getmodel
.
results
.
price
==
null
?
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
top:
SizeConfig
.
getPadding
(
16
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
''
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
)
:
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
90
),
// right: SizeConfig.getPadding(20),
top:
SizeConfig
.
getPadding
(
40
),
bottom:
SizeConfig
.
getPadding
(
20
),
),
child:
Text
(
'฿599.00 '
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black45
,
fontSize:
SizeConfig
.
getFontSize
(
20
),
decoration:
TextDecoration
.
lineThrough
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
),
top:
SizeConfig
.
getPadding
(
40
),
bottom:
SizeConfig
.
getPadding
(
20
),
),
child:
Text
(
presenter
.
getmodel
.
results
.
price
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black45
,
fontSize:
SizeConfig
.
getFontSize
(
20
),
decoration:
TextDecoration
.
lineThrough
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
),
Container
(
margin:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
20
),
...
...
@@ -380,8 +381,8 @@ class _BookingDetailState extends State<BookingDetail> {
width:
SizeConfig
.
getWidth
(
100
),
height:
SizeConfig
.
getHeight
(
45
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
24
),
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
borderRadius:
BorderRadius
.
circular
(
0
),
color:
Color
.
fromRGBO
(
238
,
175
,
183
,
1
),
),
child:
Container
(
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
6
)),
...
...
lib/ui/booking/booking_detail_presenter.dart
View file @
db3a7fcf
...
...
@@ -18,6 +18,8 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
Api
_api
;
String
type
=
'3'
;
int
getid
;
int
vendor_id
;
int
store_id
;
ProductModel
getmodel
;
...
...
@@ -25,9 +27,12 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
getDetail
()
async
{
print
(
getid
);
print
(
store_id
);
print
(
vendor_id
);
_api
=
Api
<
ProductModel
>();
var
res
=
await
_api
.
getProductDetail
({
getid
});
var
res
=
await
_api
.
getProductDetail
({});
if
(
res
.
fail
==
null
)
{
if
(
res
.
success
.
status
)
{
...
...
@@ -35,8 +40,7 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
()
{
print
(
"AAAA :
${res.success}
"
);
getmodel
=
res
.
success
;
// print(getmodel.results.data.length);
// print("getmodel" + getmodel[0].results.data[0].storeName);
},
);
}
...
...
lib/ui/shop/shop_main.dart
View file @
db3a7fcf
...
...
@@ -10,9 +10,10 @@ import 'dart:math';
class
MainShop
extends
StatefulWidget
{
int
getid
;
int
vendor_id
;
int
store_id
;
MainShop
({
Key
key
,
this
.
title
,
this
.
getid
})
:
super
(
key:
key
);
MainShop
({
Key
key
,
this
.
title
,
this
.
getid
,
this
.
vendor_id
,
this
.
store_id
})
:
super
(
key:
key
);
final
String
title
;
...
...
@@ -176,7 +177,7 @@ class _MainShopState extends State<MainShop>
controller:
_controller
,
children:
<
Widget
>[
Container
(
child:
BookingDetail
(
getid:
widget
.
getid
,),
child:
BookingDetail
(
getid:
widget
.
getid
,
vendor_id:
widget
.
vendor_id
,
store_id:
widget
.
store_id
,
),
// child: getlist(),
//width: 20,
),
...
...
lib/ui/shop/shop_service.dart
View file @
db3a7fcf
...
...
@@ -50,6 +50,8 @@ class _ShopServicePageState extends State<ShopServicePage>
presenter
.
serviceModel
.
data
[
i
].
specialPrice
==
null
?
""
:
presenter
.
serviceModel
.
data
[
i
].
specialPrice
,
presenter
.
serviceModel
.
data
[
i
].
vendorId
,
presenter
.
serviceModel
.
data
[
i
].
storeId
,
);
},
),
...
...
@@ -57,7 +59,7 @@ class _ShopServicePageState extends State<ShopServicePage>
}
Widget
myCard
(
String
title
,
String
image
,
String
price
,
String
time
,
int
id
,
String
special_price
)
{
String
special_price
,
int
vendor_id
,
int
store_id
)
{
return
InkWell
(
onTap:
()
{
setState
(
...
...
@@ -66,7 +68,8 @@ class _ShopServicePageState extends State<ShopServicePage>
context
,
CupertinoPageRoute
(
builder:
(
context
)
=>
MainShop
(
getid:
id
,
getid:
id
,
vendor_id:
vendor_id
,
store_id:
store_id
,
),
),
);
...
...
lib/ui/shop/shop_service_presenter.dart
View file @
db3a7fcf
...
...
@@ -14,11 +14,11 @@ class ShopServicePresenter extends BasePresenter<ShopServicePage> {
Servicelistitem
()
async
{
_api
=
Api
<
shopserviceModel
>();
var
res
=
await
_api
.
shopservice
({
"vendor_id"
:
"
16
"
,
"store_id"
:
"
406
"
,
"vendor_id"
:
"
9
"
,
"store_id"
:
"
284
"
,
"is_paginate"
:
"1"
,
"per_page"
:
"
8
"
,
"v"
:
"
2
"
,
"per_page"
:
"
1
"
,
"v"
:
"
1
"
,
});
if
(
res
.
fail
==
null
)
{
...
...
pubspec.lock
View file @
db3a7fcf
...
...
@@ -162,7 +162,7 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.7+
4
"
version: "0.6.7+
6
"
image_picker_platform_interface:
dependency: transitive
description:
...
...
@@ -281,14 +281,14 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.
8
"
version: "0.5.
10
"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.2+
1
"
version: "0.0.2+
2
"
shared_preferences_macos:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
db3a7fcf
...
...
@@ -14,7 +14,7 @@ description: A new Flutter project.
version
:
1.0.0+1
environment
:
sdk
:
"
>=2.
1
.0
<3.0.0"
sdk
:
"
>=2.
2
.0
<3.0.0"
dependencies
:
flutter
:
...
...
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