Commit 542a485f by Mobile : Art

update

parent 19c7959c
......@@ -34,7 +34,7 @@ class MyApp extends StatelessWidget {
),
home: MainShop()
home: SplashScreenPage()
......
......@@ -14,17 +14,17 @@ class shopserviceModel {
shopserviceModel(
{this.currentPage,
this.data,
this.firstPageUrl,
this.from,
this.lastPage,
this.lastPageUrl,
this.nextPageUrl,
this.path,
this.perPage,
this.prevPageUrl,
this.to,
this.total});
this.data,
this.firstPageUrl,
this.from,
this.lastPage,
this.lastPageUrl,
this.nextPageUrl,
this.path,
this.perPage,
this.prevPageUrl,
this.to,
this.total});
shopserviceModel.fromJson(Map<String, dynamic> json) {
currentPage = json['current_page'];
......@@ -76,20 +76,20 @@ class Data {
String price;
String specialPrice;
String sku;
dynamic tax;
Null tax;
int quantity;
dynamic weight;
Null weight;
String visibility;
dynamic newsFromDate;
dynamic newsToDate;
dynamic layout;
dynamic theme;
Null newsFromDate;
Null newsToDate;
Null layout;
Null theme;
String duration;
dynamic sellingStartTime;
dynamic sellingEndTime;
dynamic redemptionStartTime;
dynamic redemptionEndTime;
dynamic availibility;
Null sellingStartTime;
Null sellingEndTime;
Null redemptionStartTime;
Null redemptionEndTime;
Null availibility;
String isFeatured;
String isDeal;
String hasTeam;
......@@ -107,13 +107,13 @@ class Data {
int attributeSetId;
int vendorId;
String allowRoute;
String type;
Null type;
int star;
List<CategoryByProductId> categoryByProductId;
List<Null> ratings;
int storeProductId;
String typeRateService;
String priceRateService;
Null typeRateService;
Null priceRateService;
int productId;
int storeId;
String storeCode;
......@@ -127,62 +127,62 @@ class Data {
Data(
{this.id,
this.urlCode,
this.name,
this.cover,
this.excerpt,
this.detail,
this.price,
this.specialPrice,
this.sku,
this.tax,
this.quantity,
this.weight,
this.visibility,
this.newsFromDate,
this.newsToDate,
this.layout,
this.theme,
this.duration,
this.sellingStartTime,
this.sellingEndTime,
this.redemptionStartTime,
this.redemptionEndTime,
this.availibility,
this.isFeatured,
this.isDeal,
this.hasTeam,
this.offpeak,
this.reviewStatus,
this.relatedStatus,
this.upSellsStatus,
this.crossSellsStatus,
this.allowGiftMessage,
this.stockStatus,
this.status,
this.businessTypeId,
this.businessCateId,
this.businessServiceId,
this.attributeSetId,
this.vendorId,
this.allowRoute,
this.type,
this.star,
this.categoryByProductId,
this.ratings,
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.urlCode,
this.name,
this.cover,
this.excerpt,
this.detail,
this.price,
this.specialPrice,
this.sku,
this.tax,
this.quantity,
this.weight,
this.visibility,
this.newsFromDate,
this.newsToDate,
this.layout,
this.theme,
this.duration,
this.sellingStartTime,
this.sellingEndTime,
this.redemptionStartTime,
this.redemptionEndTime,
this.availibility,
this.isFeatured,
this.isDeal,
this.hasTeam,
this.offpeak,
this.reviewStatus,
this.relatedStatus,
this.upSellsStatus,
this.crossSellsStatus,
this.allowGiftMessage,
this.stockStatus,
this.status,
this.businessTypeId,
this.businessCateId,
this.businessServiceId,
this.attributeSetId,
this.vendorId,
this.allowRoute,
this.type,
this.star,
this.categoryByProductId,
this.ratings,
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});
Data.fromJson(Map<String, dynamic> json) {
id = json['id'];
......@@ -233,7 +233,12 @@ class Data {
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'];
typeRateService = json['type_rate_service'];
priceRateService = json['price_rate_service'];
......@@ -297,7 +302,9 @@ class Data {
data['category_by_product_id'] =
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['type_rate_service'] = this.typeRateService;
data['price_rate_service'] = this.priceRateService;
......@@ -326,8 +333,8 @@ class CategoryByProductId {
Null type;
String status;
int sortOrder;
int storeId;
int vendorId;
Null storeId;
Null vendorId;
Null createdAt;
String updatedAt;
String visibility;
......@@ -335,21 +342,21 @@ class CategoryByProductId {
CategoryByProductId(
{this.id,
this.parentId,
this.name,
this.code,
this.displayName,
this.cover,
this.detail,
this.type,
this.status,
this.sortOrder,
this.storeId,
this.vendorId,
this.createdAt,
this.updatedAt,
this.visibility,
this.pivot});
this.parentId,
this.name,
this.code,
this.displayName,
this.cover,
this.detail,
this.type,
this.status,
this.sortOrder,
this.storeId,
this.vendorId,
this.createdAt,
this.updatedAt,
this.visibility,
this.pivot});
CategoryByProductId.fromJson(Map<String, dynamic> json) {
id = json['id'];
......
......@@ -107,16 +107,16 @@ class Api<T> {
}
Future<Response<T>> shopservice(Object body) async {
Future<Response<T>> shopservice(String url) async {
var _model;
var _fail;
var result;
print("this is body"+body.toString());
print("this is body "+url.toString());
// (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){
print("ผลลัพท์ เท่ากับ" + "${response.body}");
if(response.statusCode == 200){
......@@ -199,20 +199,20 @@ class Api<T> {
return result;
}
Future<Response<T>> getProductDetail(Object body) async{
Future<Response<T>> getProductDetail(String url) async{
var _model;
var _fail;
var result;
print("this is body " + body.toString());
print("this is body " + url.toString());
// (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("statusCode=${response.statusCode}");
if (response.statusCode == 200) {
print("INif");
// https://backend.feelver.com/api/product/1000?store_id=284&vendor_id=9
_model = ProductModel.fromJson(json.decode(response.body));
} else {
......
import 'package:feelverapp/ui/booking/booking_detail_presenter.dart';
import 'package:feelverapp/ui/booking/bookingform.dart';
import 'package:feelverapp/ui/payment/mycart.dart';
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
......@@ -27,6 +28,8 @@ class _BookingDetailState extends State<BookingDetail> {
// print(widget.getid);
presenter = BookingDetailtPresenter(this);
setState(() {
presenter.vendor_id = widget.vendor_id;
presenter.store_id = widget.store_id;
presenter.getid = widget.getid;
});
presenter.getDetail();
......@@ -98,6 +101,7 @@ class _BookingDetailState extends State<BookingDetail> {
: Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(24),
right: SizeConfig.getPadding(24),
top: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(16)),
alignment: Alignment.topLeft,
......@@ -243,6 +247,12 @@ class _BookingDetailState extends State<BookingDetail> {
// fontWeight: FontWeight.w500),
// ),
// ),
Divider(
color: Colors.black,
height: SizeConfig.getHeight(35),
indent: 20,
endIndent: 20,
),
SizedBox(
height: SizeConfig.getHeight(16),
),
......@@ -372,28 +382,43 @@ class _BookingDetailState extends State<BookingDetail> {
fontWeight: FontWeight.w500),
),
),
Container(
margin: EdgeInsets.only(
top: SizeConfig.getPadding(20),
left: SizeConfig.getPadding(250)),
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(
top: SizeConfig.getPadding(20),
left: SizeConfig.getPadding(250)),
// color: Colors.red,
width: SizeConfig.getWidth(100),
height: SizeConfig.getHeight(45),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(0),
color: Color.fromRGBO(238, 175, 183, 1),
),
child: Container(
padding: EdgeInsets.only(top: SizeConfig.getPadding(6)),
child: Text(
'หยิบใส่รถเข็น',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
width: SizeConfig.getWidth(100),
height: SizeConfig.getHeight(45),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(0),
color: Color.fromRGBO(238, 175, 183, 1),
),
child: Container(
padding: EdgeInsets.only(top: SizeConfig.getPadding(6)),
child: Text(
'หยิบใส่รถเข็น',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
),
),
),
......
......@@ -32,7 +32,9 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
_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.success.status) {
......
......@@ -77,6 +77,12 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
height: SizeConfig.getWidth(24),
),
onPressed: () {
setState(() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => HomePage()),
);
});
print("Pressed");
},
),
......
......@@ -48,9 +48,8 @@ class _MyCartState extends State<MyCart> {
),
),
Container(
height: SizeConfig.getHeight(40),
width: SizeConfig.getWidth(200),
width: SizeConfig.getWidth(180),
color: Colors.white,
child: TextField(
decoration: InputDecoration(
......@@ -62,7 +61,7 @@ class _MyCartState extends State<MyCart> {
icon: Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
size: 40,
size: 30,
),
onPressed: () {}),
],
......@@ -121,7 +120,6 @@ class _MyCartState extends State<MyCart> {
),
Spacer(),
Container(
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0),
......@@ -163,50 +161,52 @@ class _MyCartState extends State<MyCart> {
return Column(
children: <Widget>[
header(),
containt(),
SizedBox(
height: SizeConfig.getHeight(15),
),
list1(),
],
);
}
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(),
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() {
return Card(
elevation: 5,
child: Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(12),
left: SizeConfig.getPadding(16),
top: SizeConfig.getPadding(8),
right: SizeConfig.getPadding(10),
right: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(8),
),
// color: Colors.red,
......@@ -222,7 +222,7 @@ class _MyCartState extends State<MyCart> {
Expanded(
child: Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(10),
left: SizeConfig.getPadding(5),
right: SizeConfig.getPadding(5),
),
child: Column(
......@@ -269,168 +269,6 @@ class _MyCartState extends State<MyCart> {
// color: Colors.yellow,
child: Row(
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(
'assets/images/clock.png',
height: SizeConfig.getHeight(20),
......@@ -522,82 +360,41 @@ class _MyCartState extends State<MyCart> {
}
Widget header() {
return Container(
child: Stack(
children: <Widget>[
Container(
color: Color.fromRGBO(69, 85, 79, 1),
height: SizeConfig.getHeight(200),
width: MediaQuery.of(context).size.width,
),
Positioned(
top: SizeConfig.getPadding(50),
left:
SizeConfig.getPadding(MediaQuery.of(context).size.width / 3.5),
child: Container(
alignment: Alignment.topCenter,
child: Image.asset(
'assets/images/feelver_banner.png',
width: MediaQuery.of(context).size.width / 2.5,
),
),
),
Positioned(
top: SizeConfig.getPadding(77),
left: SizeConfig.getPadding(16),
child: Container(
child: GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return NavDrawer();
},
);
},
child: Image.asset(
'assets/images/ic_menu.png',
height: SizeConfig.getWidth(24),
width: SizeConfig.getWidth(30),
fit: BoxFit.cover,
),
),
),
),
Positioned(
top: SizeConfig.getPadding(77),
right: SizeConfig.getPadding(60),
child: Container(
child: Image.asset(
'assets/images/ic_noti.png',
height: SizeConfig.getWidth(30),
width: SizeConfig.getWidth(30),
fit: BoxFit.cover,
),
return Stack(
children: <Widget>[
Container(
color: Color.fromRGBO(69, 85, 79, 1),
height: SizeConfig.getHeight(150),
width: MediaQuery.of(context).size.width,
),
Positioned(
top: SizeConfig.getPadding(50),
left: SizeConfig.getPadding(MediaQuery.of(context).size.width / 3.5),
child: Container(
alignment: Alignment.topCenter,
child: Image.asset(
'assets/images/feelver_banner.png',
width: MediaQuery.of(context).size.width / 2.5,
),
),
Positioned(
top: SizeConfig.getPadding(77),
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,
),
),
Positioned(
top: SizeConfig.getPadding(70),
left: SizeConfig.getPadding(16),
child: Container(
child: GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Icon(
Icons.keyboard_arrow_left,
color: Colors.white,
size: SizeConfig.getFontSize(40),
),
),
),
],
),
),
],
);
}
}
......@@ -187,9 +187,11 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>
return presenter.getmodel == null
? Container(
child: Center(
child: CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(Colors.teal),
)))
child: CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(Colors.teal),
),
),
)
: Container(
padding: EdgeInsets.only(
top: SizeConfig.getPadding(80),
......@@ -223,7 +225,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>
CupertinoPageRoute(
builder: (context) => ShopListDetail(
// id: id,
),
),
),
);
});
......
import 'package:carousel_pro/carousel_pro.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/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/shoplistdetail_presenter.dart';
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ShopListDetail extends StatefulWidget {
String id;
ShopListDetail({Key key, this.id,}) : super(key: key);
String id;
ShopListDetail({
Key key,
this.id,
}) : super(key: key);
@override
_ShopListDetailState createState() => _ShopListDetailState();
}
class _ShopListDetailState extends State<ShopListDetail> {
bool fav=false;
bool fav = false;
ShoplistdetailPresenter presenter;
@override
......@@ -26,9 +36,8 @@ class _ShopListDetailState extends State<ShopListDetail> {
presenter.Detai(widget.id);
presenter.getid();
// List values = presenter.model.result[0].location.split(","); // split() will split from . and gives new List with separated elements.
//values.forEach(print);
// List values = presenter.model.result[0].location.split(","); // split() will split from . and gives new List with separated elements.
//values.forEach(print);
}
@override
......@@ -40,19 +49,22 @@ class _ShopListDetailState extends State<ShopListDetail> {
Widget build(BuildContext context) {
SizeConfig(context);
return Scaffold(
body:presenter.model==null?Container(child:
Center( child: CircularProgressIndicator(
body: presenter.model == null
? Container(
child: Center(
child: CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(
Color.fromRGBO(69, 85, 79, 1),
),
),),
): _setupView(),
),
),
)
: _setupView(),
);
}
_setupView() {
return SingleChildScrollView(
return SingleChildScrollView(
child: Column(
children: <Widget>[
Stack(
......@@ -72,151 +84,153 @@ class _ShopListDetailState extends State<ShopListDetail> {
'assets/images/feelver_banner.png',
width: MediaQuery.of(context).size.width / 2.5,
),
// Image.network(
// Api.baseApiforimage+ presenter.model.result[0].storeLogo,
// height: SizeConfig.getWidth(180),
// width: MediaQuery.of(context).size.width,
// fit: BoxFit.cover,
// ),
// Image.network(
// Api.baseApiforimage+ presenter.model.result[0].storeLogo,
// height: SizeConfig.getWidth(180),
// width: MediaQuery.of(context).size.width,
// fit: BoxFit.cover,
// ),
),
),
Positioned(
top: SizeConfig.getPadding(77),
top: SizeConfig.getPadding(70),
left: SizeConfig.getPadding(16),
child: Container(
child: GestureDetector(
onTap: () {
Navigator.pop(context);
Navigator.pop(context);
},
child: Icon(
Icons.keyboard_arrow_left,
color: Colors.white,
size: SizeConfig.getFontSize(24),
),
size: SizeConfig.getFontSize(40),
),
),
),
),
],
),
Container(
height: SizeConfig.getHeight(240),
height: SizeConfig.getHeight(270),
child: Stack(
children: <Widget>[
Container(
height: SizeConfig.getHeight(190),
width: SizeConfig.getHeight(350),
child: Carousel(
images: [
Image.network(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,),
Image.network(presenter.model.result[0].storeCover,fit: BoxFit.cover,),
],
animationDuration: const Duration(milliseconds: 300),
dotSize: 8.0,
dotSpacing: 25.0,
dotIncreaseSize: 2.0,
dotColor: Colors.white,
dotBgColor: Colors.transparent,
// showIndicator: true,
indicatorBgPadding: 20.0,
boxFit: BoxFit.cover,
radius: Radius.circular(0.0),
overlayShadow: false,
// overlayShadowColors: Colors.transparent,
// overlayShadowSize: 0.5,
autoplay: true,
),
),
Positioned(
Container(
height: SizeConfig.getHeight(230),
width: SizeConfig.getWidth(MediaQuery.of(context).size.width),
child: Carousel(
images: [
Image.network(
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,
),
Image.network(
presenter.model.result[0].storeCover,
fit: BoxFit.cover,
),
],
animationDuration: const Duration(milliseconds: 300),
dotSize: 8.0,
dotSpacing: 25.0,
dotIncreaseSize: 2.0,
dotColor: Colors.white,
dotBgColor: Colors.transparent,
// showIndicator: true,
indicatorBgPadding: 20.0,
boxFit: BoxFit.cover,
radius: Radius.circular(0.0),
overlayShadow: false,
// overlayShadowColors: Colors.transparent,
// overlayShadowSize: 0.5,
autoplay: true,
),
),
Positioned(
right: SizeConfig.getPadding(16),
top: SizeConfig.getPadding(16),
child: InkResponse(
highlightShape: BoxShape.circle,
highlightColor: Color(0xFFDD175F),
focusColor:Color(0xFFDD175F),
highlightColor: Color(0xFFDD175F),
focusColor: Color(0xFFDD175F),
splashColor: Color(0xFFDD175F),
onTap: () {
setState(() {
presenter.fav?presenter.fav=false:
presenter.Addfav(widget.id);
});
},
child:ImageIcon(
AssetImage('assets/images/ic_fav_list.png'),
color:presenter.fav?Color(0xFFDD175F): Colors.white,
size: SizeConfig.getFontSize(30),
onTap: () {
setState(() {
presenter.fav
? presenter.fav = false
: presenter.Addfav(widget.id);
});
},
child: ImageIcon(
AssetImage('assets/images/ic_fav_list.png'),
color: presenter.fav ? Color(0xFFDD175F) : Colors.white,
size: SizeConfig.getFontSize(30),
),
),
),),
),
Positioned(
left: SizeConfig.getPadding(16),
top: SizeConfig.getPadding(165),
child: Image.asset(
'assets/images/pin_list.png',
width: SizeConfig.getWidth(50),
height: SizeConfig.getWidth(50),
width: SizeConfig.getWidth(60),
height: SizeConfig.getWidth(60),
),
),
Positioned(
left: SizeConfig.getPadding(75),
top: SizeConfig.getPadding(190),
child: GestureDetector(
onTap: (){
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.
values.forEach(print);
print("lat ="+values[0]);
print("lng ="+values[1]);
presenter.gotoDirection(values[0], values[1]);
},
child: Text(
"นำทาง",
textAlign: TextAlign.left,
style: TextStyle(
decoration: TextDecoration.underline,
color: Colors.grey,
fontSize: SizeConfig.getFontSize(13),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),)
),
left: SizeConfig.getPadding(80),
top: SizeConfig.getPadding(200),
child: GestureDetector(
onTap: () {
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.
values.forEach(print);
print("lat =" + values[0]);
print("lng =" + values[1]);
presenter.gotoDirection(values[0], values[1]);
},
child: Text(
"นำทาง",
textAlign: TextAlign.left,
style: TextStyle(
decoration: TextDecoration.underline,
color: Colors.grey,
fontSize: SizeConfig.getFontSize(13),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),
)),
],
),
),
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(24),
right: SizeConfig.getPadding(24),
bottom: SizeConfig.getPadding(5),
SizedBox(
height: SizeConfig.getHeight(16),
),
alignment: Alignment.topLeft,
child: Text(
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(24),
right: SizeConfig.getPadding(24),
bottom: SizeConfig.getPadding(5),
),
alignment: Alignment.topLeft,
child: Text(
presenter.model.result[0].storeName,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black87,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black87,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),
),
),
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(24),
......@@ -224,7 +238,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom: SizeConfig.getPadding(15)),
alignment: Alignment.topLeft,
child: Text(
"โทร "+presenter.model.result[0].phone,
"โทร " + presenter.model.result[0].phone,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.grey,
......@@ -233,14 +247,14 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontWeight: FontWeight.w500),
),
),
Container(
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(24),
right: SizeConfig.getPadding(24),
bottom: SizeConfig.getPadding(15)),
alignment: Alignment.topLeft,
child: Text(
"email "+presenter.model.result[0].email,
"email " + presenter.model.result[0].email,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.grey,
......@@ -249,7 +263,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontWeight: FontWeight.w500),
),
),
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(24),
......@@ -257,7 +270,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom: SizeConfig.getPadding(15)),
alignment: Alignment.topLeft,
child: Text(
"ที่อยู่ "+ presenter.model.result[0].address,
"ที่อยู่ " + presenter.model.result[0].address,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.grey,
......@@ -298,25 +311,18 @@ class _ShopListDetailState extends State<ShopListDetail> {
height: SizeConfig.getHeight(20),
),
_detail(),
_servicelist(),
_servicelist(),
],
),
);
}
_servicelist() {
return Container(
padding: EdgeInsets.only(left:10,right:10),
child:
Column(
_servicelist() {
return Container(
padding: EdgeInsets.only(left: SizeConfig.getPadding(16), right: SizeConfig.getPadding(16)
),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.only(
top: SizeConfig.getPadding(15),
......@@ -325,165 +331,197 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom: SizeConfig.getPadding(5),
),
alignment: Alignment.topLeft,
child: Text(
'บริการ',
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black87,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),
),
Column(
children:
List.generate( presenter.model.result[0].openHour.length,(i) {
return Column(children: [
SizedBox(height: 30,),
Align(
alignment: Alignment.topLeft,
child:Text(
presenter.model.result[0].storeProduct[i].product.name,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black87,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),),
SizedBox(height: 30,),
Row(children: [
Icon(
// child: Text(
// 'บริการ',
// textAlign: TextAlign.left,
// style: TextStyle(
// color: Colors.black87,
// fontSize: SizeConfig.getFontSize(16),
// fontFamily: "SF_Pro_Text",
// fontWeight: FontWeight.w700),
// ),
),
Column(
children: List.generate(
presenter.model.result[0].openHour.length,
(i) {
return InkWell(
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(
alignment: Alignment.topLeft,
child: Text(
presenter
.model.result[0].storeProduct[i].product.name,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black87,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),
),
SizedBox(
height: 16,
),
Row(children: [
Icon(
Icons.timer,
color: Colors.pinkAccent,
size: 20,
),
Text(
" "+presenter.model.result[0].storeProduct[i].product.duration+" ชม.",
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black87,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w200),
),Spacer(),
presenter.model.result[0].storeProduct[i].product.specialPrice==null?
Text(
"฿"+presenter.model.result[0].storeProduct[i].product.price,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
):
Container(child:
Row(children: [
Icon(
Icons.local_offer,
color: Colors.pinkAccent,
size: 20,
" " +
presenter.model.result[0].storeProduct[i].product
.duration +
" ชม.",
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black87,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w200),
),
Text(
" ฿"+presenter.model.result[0].storeProduct[i].product.price,
textAlign: TextAlign.left,
style: TextStyle(
decoration: TextDecoration.lineThrough,
color: Colors.pinkAccent,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),
Text(
" ฿"+presenter.model.result[0].storeProduct[i].product.specialPrice,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
)
],)
)
]),
SizedBox(height: 20,),
Padding(
padding: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0),
child: Material( //Wrap with Material
shape: RoundedRectangleBorder(borderRadius:BorderRadius.circular(30.0) ),
elevation: 0.0,
color: Color.fromRGBO(106, 179, 170, 1),
clipBehavior: Clip.antiAlias, // Add This
child: MaterialButton(
minWidth:MediaQuery.of(context).size.width - 50,
height: 55,
color: Color(0xff3694A3),
child:
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.shopping_cart,
color: Colors.white,
size: 25,
Spacer(),
presenter.model.result[0].storeProduct[i].product
.specialPrice ==
null
? Text(
"฿" +
presenter.model.result[0].storeProduct[i]
.product.price,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
)
: Container(
child: Row(
children: [
Icon(
Icons.local_offer,
color: Colors.pinkAccent,
size: 20,
),
Text(
" ฿" +
presenter.model.result[0]
.storeProduct[i].product.price,
textAlign: TextAlign.left,
style: TextStyle(
decoration: TextDecoration.lineThrough,
color: Colors.pinkAccent,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),
Text(
" ฿" +
presenter
.model
.result[0]
.storeProduct[i]
.product
.specialPrice,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
)
],
))
]),
SizedBox(
height: 10,
),
Padding(
padding: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0),
child: Material(
//Wrap with Material
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0)),
elevation: 0.0,
color: Color(0xff3694A3),
clipBehavior: Clip.antiAlias,
// Add This
child: MaterialButton(
minWidth: MediaQuery.of(context).size.width - 50,
height: SizeConfig.getHeight(50),
color: Color(0xff3694A3),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.shopping_cart,
color: Colors.white,
size: 25,
),
new Text(' หยิบใส่รถเข็น',
style: new TextStyle(
fontSize: 16.0, color: Colors.white)),
],
),
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");
},
),
),
new Text(' หยิบใส่รถเข็น',
style: new TextStyle(fontSize: 16.0, color: Colors.white)),
],),
onPressed: () {
print(" Go to cart");
},
),
),
),
SizedBox(height: 30,),
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(20),
right: SizeConfig.getPadding(20),
top: SizeConfig.getPadding(40),
bottom: SizeConfig.getPadding(20),
),
SizedBox(
height: 30,
),
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(20),
right: SizeConfig.getPadding(20),
top: SizeConfig.getPadding(40),
bottom: SizeConfig.getPadding(20),
),
height: SizeConfig.getHeight(1),
width: MediaQuery.of(context).size.width - 40,
color: Colors.grey,
)
],
),
);
},
),
height: SizeConfig.getHeight(1),
width: MediaQuery.of(context).size.width - 40,
color: Colors.grey,
)
],);
},
),
),
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(20),
......@@ -495,7 +533,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
width: MediaQuery.of(context).size.width - 40,
color: Colors.grey,
),
],
),
);
......@@ -522,8 +559,6 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontWeight: FontWeight.w700),
),
),
Container(
height: 200,
padding: EdgeInsets.only(
......@@ -533,24 +568,21 @@ class _ShopListDetailState extends State<ShopListDetail> {
bottom: SizeConfig.getPadding(5),
),
alignment: Alignment.topLeft,
child:ListView.builder(
itemCount: presenter.model.result[0].openHour.length,
itemBuilder: (context, i) {
return
Text(
"${presenter.model.result[0].openHour[i].name} ${presenter.model.result[0].openHour[i].open} - ${presenter.model.result[0].openHour[i].closed} ",
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black54,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
);
},
),
child: ListView.builder(
itemCount: presenter.model.result[0].openHour.length,
itemBuilder: (context, i) {
return Text(
"${presenter.model.result[0].openHour[i].name} ${presenter.model.result[0].openHour[i].open} - ${presenter.model.result[0].openHour[i].closed} ",
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black54,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
);
},
),
),
Container(
padding: EdgeInsets.only(
left: SizeConfig.getPadding(20),
......@@ -736,7 +768,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
top: SizeConfig.getPadding(10),
),
child: Text(
presenter.model.result[0].excerpt,
presenter.model.result[0].excerpt,
textAlign: TextAlign.left,
style: TextStyle(
// decoration: TextDecoration.underline,
......@@ -754,7 +786,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
left: SizeConfig.getPadding(20),
right: SizeConfig.getPadding(20),
top: SizeConfig.getPadding(40),
bottom: SizeConfig.getPadding(20),
bottom: SizeConfig.getPadding(10),
),
height: SizeConfig.getHeight(1),
width: MediaQuery.of(context).size.width - 40,
......
......@@ -285,7 +285,7 @@ class _MainShopState extends State<MainShop>
child: Container(
// color: Colors.blue,
// height: double.maxFinite,
child: ShopServicePage(),
child: ShopServicePage(getid: widget.getid,vendor_id: widget.vendor_id,store_id: widget.store_id,),
),
),
],
......@@ -295,7 +295,7 @@ class _MainShopState extends State<MainShop>
Container(
// color: Colors.red,
child: ShopReviewsPage(),
child: ShopReviewsPage(getid: widget.getid,vendor_id: widget.vendor_id,store_id: widget.store_id,),
// child: getlist(),
//width: 20,
),
......
......@@ -3,8 +3,19 @@ import 'package:feelverapp/util/rating_star.dart';
import 'package:flutter/material.dart';
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
_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> {
......
......@@ -9,6 +9,13 @@ import '../booking/booking_detail.dart';
import 'shop_main.dart';
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
_ShopServicePageState createState() => _ShopServicePageState();
}
......@@ -24,6 +31,12 @@ class _ShopServicePageState extends State<ShopServicePage>
super.initState();
presenter = ShopServicePresenter(this);
setState(() {
presenter.vendor_id = widget.vendor_id;
presenter.store_id = widget.store_id;
presenter.getid = widget.getid;
});
presenter.Servicelistitem();
}
......@@ -35,31 +48,44 @@ class _ShopServicePageState extends State<ShopServicePage>
@override
Widget build(BuildContext context) {
SizeConfig(context);
return Container(
child: presenter.serviceModel == null
? Container()
: ListView.builder(
itemCount: presenter.serviceModel.data.length,
itemBuilder: (context, i) {
return myCard(
presenter.serviceModel.data[i].name,
presenter.serviceModel.data[i].cover,
presenter.serviceModel.data[i].price,
presenter.serviceModel.data[i].duration,
presenter.serviceModel.data[i].id,
presenter.serviceModel.data[i].specialPrice == null
? ""
: presenter.serviceModel.data[i].specialPrice,
presenter.serviceModel.data[i].vendorId,
presenter.serviceModel.data[i].storeId,
);
},
return presenter.serviceModel == null
? Container(
child: Center(
child: CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(Colors.teal),
),
),
);
)
: Container(
child: presenter.serviceModel.data == null
? Container()
: ListView.builder(
itemCount: presenter.serviceModel.data.length,
itemBuilder: (context, i) {
// print(presenter.serviceModel.data.length);
return myCard(
presenter.serviceModel.data[i].name,
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].duration,
presenter.serviceModel.data[i].id,
presenter.serviceModel.data[i].specialPrice == null
? ""
: presenter.serviceModel.data[i].specialPrice,
presenter.serviceModel.data[i].vendorId,
presenter.serviceModel.data[i].storeId,
);
},
),
);
}
Widget myCard(String title, String image, String price, String time, int id,
String special_price , int vendor_id,int store_id) {
Widget myCard(String title, String image, String detail, String price,
String time, int id, String special_price, int vendor_id, int store_id) {
return InkWell(
onTap: () {
setState(
......@@ -68,8 +94,9 @@ class _ShopServicePageState extends State<ShopServicePage>
context,
CupertinoPageRoute(
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>
// color: Colors.blue,
height: SizeConfig.getHeight(250),
child: presenter.serviceModel == null
? Image.asset(
? Image.network(
"assets/images/demo_img.png",
fit: BoxFit.cover,
)
......@@ -133,12 +160,12 @@ class _ShopServicePageState extends State<ShopServicePage>
height: 5,
),
Text(
"SPA Cenvaree @ Centara Grand CentralWorld Bangkok",
detail,
style: TextStyle(
color: Color(0xff969696),
fontSize: SizeConfig.getFontSize(11),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
fontWeight: FontWeight.w500),maxLines: 3,
),
],
),
......@@ -149,30 +176,28 @@ class _ShopServicePageState extends State<ShopServicePage>
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/pin_drop.png',
height: 20,
width: 20,
),
SizedBox(
width: 5,
),
Text(
"พญาไท กรุงเทพฯ",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(13),
fontFamily: "SF_Pro_Text",
),
),
],
),
SizedBox(
height: 10,
),
// Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: <Widget>[
// Image.asset(
// 'assets/images/pin_drop.png',
// height: 20,
// width: 20,
// ),
// SizedBox(
// width: 5,
// ),
// Text(
// addres,
// style: TextStyle(
// color: Colors.black,
// fontSize: SizeConfig.getFontSize(13),
// fontFamily: "SF_Pro_Text",
// ),
// ),
// ],
// ),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
......
......@@ -6,6 +6,10 @@ import 'package:flutter/material.dart';
class ShopServicePresenter extends BasePresenter<ShopServicePage> {
Api _api;
int getid;
int vendor_id;
int store_id;
final formkey = GlobalKey<FormState>();
shopserviceModel serviceModel;
......@@ -13,20 +17,17 @@ class ShopServicePresenter extends BasePresenter<ShopServicePage> {
Servicelistitem() async {
_api = Api<shopserviceModel>();
var res = await _api.shopservice({
"vendor_id": "9",
"store_id": "284",
"is_paginate": "1",
"per_page": "1",
"v": "1",
});
var res = await _api.shopservice(
'https://backend-uat.feelver.com/api/product/getListsProductFormat?vendor_id=' +
vendor_id.toString() +
'&store_id=' +
store_id.toString() +
'&is_paginate=1&per_page=99&v=1');
if (res.fail == null) {
setState(() {
serviceModel = res.success;
print("sssssssssssss");
print('${serviceModel.data[0].name}');
print('${serviceModel.data[1].name}');
});
} else {
print('res Fail');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment