update service sliver list tab

parent cebda42f
......@@ -22,14 +22,14 @@ import 'package:feelverapp/model/shopservice/shop_service_Model.dart';
import 'package:http/http.dart' as http;
class Api<T> {
final String _baseApi = "https://backend-uat.feelver.com/api";
final String _baseApi = "https://backend-uat.feelver.com/api";
final _headerApi = {
"Authorization":
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs",
};
static final String baseApi = "https://backend-uat.feelver.com/api";
Future<Response<T>> favorite(Object body) async {
var _model;
var _fail;
......
......@@ -7,7 +7,8 @@ class ShopNearbyPlacesPage extends StatefulWidget {
@override
_ShopNearbyPlacesPageState createState() => _ShopNearbyPlacesPageState();
}
final List<String> entries = <String>['A', 'B', 'C'];
final List<String> detail = <String>['SPA Cenvaree @ centara Grand Centralworld', 'SPA Cenvaree @ centara Grand Centralworld', 'SPA Cenvaree @ centara Grand Centralworld'];
final List<String> place = <String>['พญาไทย', 'บางเขน', 'เกษตร'];
class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
@override
......@@ -75,74 +76,9 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
setState(() {});
},
),
FilterChip(
label: Text(
"ที่เที่ยว (5)",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
shape: StadiumBorder(
side: BorderSide(color: Colors.white),
),
onSelected: (bool value) {
print("selected");
},
),
FilterChip(
label: Text(
"ที่กิน (3)",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
shape: StadiumBorder(
side: BorderSide(color: Colors.white),
),
onSelected: (bool value) {
print("selected");
},
),
FilterChip(
label: Text(
"ที่พัก (1)",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
shape: StadiumBorder(
side: BorderSide(color: Colors.white),
),
onSelected: (bool value) {
print("selected");
},
),
FilterChip(
label: Text(
"กิจกรรม (1)",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
shape: StadiumBorder(
side: BorderSide(color: Colors.white),
),
onSelected: (bool value) {
print("selected");
},
),
],
),
),
......@@ -156,22 +92,22 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
getlist() {
return Container(
padding: EdgeInsets.only(
top: SizeConfig.getPadding(140),
top: SizeConfig.getPadding(80),
left: SizeConfig.getPadding(16),
right: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(10),
),
child: ListView.builder(
scrollDirection: Axis.vertical,
itemCount: entries.length,
itemCount: detail.length,
itemBuilder: (context, i) {
return _nearByItem(entries[i]);
return _nearByItem(detail[i],place[i]);
},
),
);
}
Widget _nearByItem(String title) {
Widget _nearByItem(String title,String place) {
return InkWell(
onTap: () {
Navigator.push(
......@@ -186,7 +122,8 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 10),
padding: const EdgeInsets.only(bottom: 50,left: 15,top:10,right:15),
child: Image.asset(
'assets/images/demo_img.png',
width: SizeConfig.getWidth(110),
......@@ -215,7 +152,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
),
Container(
child: Text(
'พิพิธภัณฑ์สัตว์น้ำ',
title,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black54,
......@@ -243,7 +180,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
width: SizeConfig.getWidth(4),
),
Text(
'54 km',
place,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: SizeConfig.getFontSize(12),
......@@ -252,89 +189,8 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
),
],
),
Container(
child: Text(
'พิพิธภัณฑ์สัตว์น้ำ ซี ไลฟ์ โอเชียน เวิลด์ กรุงเทพ หรือ บางกอก ซี ไลฟ์ โอเชียนเวิลด์...',
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black54,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
// alignment: Alignment.topLeft,
padding: EdgeInsets.only(
top: SizeConfig.getPadding(8),
left: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(0)),
),
Row(
children: <Widget>[
SizedBox(
width: SizeConfig.getWidth(4),
),
Container(
alignment: Alignment.topLeft,
child: Text(
'4.4',
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black54,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
padding: EdgeInsets.only(
top: SizeConfig.getPadding(5),
left: SizeConfig.getPadding(10),
bottom: SizeConfig.getPadding(5)),
),
SizedBox(
width: SizeConfig.getWidth(14),
),
ImageIcon(
AssetImage('assets/images/ic_star_active.png'),
color: Color.fromRGBO(255, 207, 7, 1),
size: SizeConfig.getFontSize(16),
),
SizedBox(
width: SizeConfig.getWidth(2),
),
ImageIcon(
AssetImage('assets/images/ic_star_active.png'),
color: Color.fromRGBO(255, 207, 7, 1),
size: SizeConfig.getFontSize(16),
),
SizedBox(
width: SizeConfig.getWidth(2),
),
ImageIcon(
AssetImage('assets/images/ic_star_active.png'),
color: Color.fromRGBO(255, 207, 7, 1),
size: SizeConfig.getFontSize(16),
),
SizedBox(
width: SizeConfig.getWidth(2),
),
ImageIcon(
AssetImage('assets/images/ic_star_active.png'),
color: Color.fromRGBO(255, 207, 7, 1),
size: SizeConfig.getFontSize(16),
),
SizedBox(
width: SizeConfig.getWidth(2),
),
ImageIcon(
AssetImage('assets/images/ic_star_unactive.png'),
color: Colors.grey,
size: SizeConfig.getFontSize(16),
),
SizedBox(
width: SizeConfig.getWidth(40),
height: SizeConfig.getWidth(30),
),
],
),
SizedBox(
height: SizeConfig.getWidth(10),
),
......
......@@ -161,7 +161,7 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixi
Column(
children: <Widget>[
Container(
color: Colors.white,
color: Colors.transparent,
height: 120,
child: Wrap(
alignment: WrapAlignment.start,
......@@ -186,73 +186,6 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixi
setState(() {});
},
),
FilterChip(
label: Text(
"ที่เที่ยว (5)",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
shape: StadiumBorder(
side: BorderSide(color: Colors.white),
),
onSelected: (bool value) {
print("selected");
},
),
FilterChip(
label: Text(
"ที่กิน (3)",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
shape: StadiumBorder(
side: BorderSide(color: Colors.white),
),
onSelected: (bool value) {
print("selected");
},
),
FilterChip(
label: Text(
"ที่พัก (1)",
style: TextStyle(
color: Colors.white,
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
shape: StadiumBorder(
side: BorderSide(color: Colors.white),
),
onSelected: (bool value) {
print("selected");
},
),
FilterChip(
label: Text(
"กิจกรรม (1)",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
shape: StadiumBorder(
side: BorderSide(color: Colors.white),
),
onSelected: (bool value) {
print("selected");
},
),
],
),
),
......
......@@ -3,6 +3,8 @@ import 'package:feelverapp/util/SizeConfig.dart';
import 'package:feelverapp/util/rating_star.dart';
import 'package:flutter/material.dart';
import '../../service/api.dart';
class ShopServicePage extends StatefulWidget {
@override
_ShopServicePageState createState() => _ShopServicePageState();
......@@ -80,7 +82,7 @@ class _ShopServicePageState extends State<ShopServicePage>
fit: BoxFit.cover,
)
: Image.network(
image,
Api.baseApi+ image,
fit: BoxFit.cover,
)),
),
......
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