update service sliver list tab

parent cebda42f
...@@ -29,7 +29,7 @@ class Api<T> { ...@@ -29,7 +29,7 @@ class Api<T> {
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs",
}; };
static final String baseApi = "https://backend-uat.feelver.com/api";
Future<Response<T>> favorite(Object body) async { Future<Response<T>> favorite(Object body) async {
var _model; var _model;
var _fail; var _fail;
......
...@@ -7,7 +7,8 @@ class ShopNearbyPlacesPage extends StatefulWidget { ...@@ -7,7 +7,8 @@ class ShopNearbyPlacesPage extends StatefulWidget {
@override @override
_ShopNearbyPlacesPageState createState() => _ShopNearbyPlacesPageState(); _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> { class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
@override @override
...@@ -75,74 +76,9 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> { ...@@ -75,74 +76,9 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
setState(() {}); 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> { ...@@ -156,22 +92,22 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
getlist() { getlist() {
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: SizeConfig.getPadding(140), top: SizeConfig.getPadding(80),
left: SizeConfig.getPadding(16), left: SizeConfig.getPadding(16),
right: SizeConfig.getPadding(16), right: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(10), bottom: SizeConfig.getPadding(10),
), ),
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
itemCount: entries.length, itemCount: detail.length,
itemBuilder: (context, i) { 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( return InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
...@@ -186,7 +122,8 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> { ...@@ -186,7 +122,8 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: const EdgeInsets.only(left: 10), padding: const EdgeInsets.only(bottom: 50,left: 15,top:10,right:15),
child: Image.asset( child: Image.asset(
'assets/images/demo_img.png', 'assets/images/demo_img.png',
width: SizeConfig.getWidth(110), width: SizeConfig.getWidth(110),
...@@ -215,7 +152,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> { ...@@ -215,7 +152,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
), ),
Container( Container(
child: Text( child: Text(
'พิพิธภัณฑ์สัตว์น้ำ', title,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: Colors.black54, color: Colors.black54,
...@@ -243,7 +180,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> { ...@@ -243,7 +180,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
width: SizeConfig.getWidth(4), width: SizeConfig.getWidth(4),
), ),
Text( Text(
'54 km', place,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: SizeConfig.getFontSize(12), fontSize: SizeConfig.getFontSize(12),
...@@ -252,89 +189,8 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> { ...@@ -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( SizedBox(
height: SizeConfig.getWidth(10), height: SizeConfig.getWidth(10),
), ),
......
...@@ -161,7 +161,7 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixi ...@@ -161,7 +161,7 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixi
Column( Column(
children: <Widget>[ children: <Widget>[
Container( Container(
color: Colors.white, color: Colors.transparent,
height: 120, height: 120,
child: Wrap( child: Wrap(
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
...@@ -186,73 +186,6 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixi ...@@ -186,73 +186,6 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixi
setState(() {}); 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'; ...@@ -3,6 +3,8 @@ import 'package:feelverapp/util/SizeConfig.dart';
import 'package:feelverapp/util/rating_star.dart'; import 'package:feelverapp/util/rating_star.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../service/api.dart';
class ShopServicePage extends StatefulWidget { class ShopServicePage extends StatefulWidget {
@override @override
_ShopServicePageState createState() => _ShopServicePageState(); _ShopServicePageState createState() => _ShopServicePageState();
...@@ -80,7 +82,7 @@ class _ShopServicePageState extends State<ShopServicePage> ...@@ -80,7 +82,7 @@ class _ShopServicePageState extends State<ShopServicePage>
fit: BoxFit.cover, fit: BoxFit.cover,
) )
: Image.network( : Image.network(
image, Api.baseApi+ image,
fit: BoxFit.cover, 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