update shop_main,edit shop_service

parent 6926c554
import 'package:feelverapp/ui/nearme/near_me_detail.dart';
import 'package:feelverapp/ui/shop/shop_service.dart';
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
......@@ -7,20 +8,34 @@ class MainShop extends StatefulWidget {
@override
_MainShopState createState() => new _MainShopState();
}
final List<String> entries = <String>['A', 'B', 'C'];
class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin {
class _MainShopState extends State<MainShop>
with SingleTickerProviderStateMixin {
TabController _controller;
@override
void initState() {
// TODO: implement initState
super.initState();
_controller = new TabController(length: 4, vsync: this);
_controller.addListener(_handleTabSelection);
}
@override
void dispose() {
// TODO: implement dispose
_controller.dispose();
super.dispose();
}
void _handleTabSelection() {
setState(() {
});
}
@override
Widget build(BuildContext context) {
SizeConfig(context);
......@@ -31,15 +46,13 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
onPressed: () => Navigator.of(context).pop(),
),
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
title: new Text('Thai Body Balance',style:TextStyle(
color: Colors.white,
fontSize: 25
) ,),
title: new Text(
'Thai Body Balance',
style: TextStyle(color: Colors.white, fontSize: 25),
),
elevation: 0,
),
body:
new ListView(
body: new ListView(
children: <Widget>[
// new Card(
// child: new ListTile(
......@@ -48,83 +61,85 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
// ),
new Container(
padding: const EdgeInsets.only(bottom:25,top: 15),
decoration: new BoxDecoration(color: Color.fromRGBO(106, 179, 170, 1),),
padding: const EdgeInsets.only(bottom: 25, top: 15),
decoration: new BoxDecoration(
color: Color.fromRGBO(106, 179, 170, 1),
),
child: new TabBar(
indicatorColor: Colors.transparent,
controller: _controller,
tabs: [
new Tab(
icon: Icon(Icons.assignment,
color: _controller.index == 0
? Colors.yellowAccent: Colors.white),
child:Text(
? Colors.yellowAccent
: Colors.white),
child: Text(
'ข้อมูลร้าน',
style: TextStyle(
color: _controller.index == 0
? Colors.yellowAccent: Colors.white,
fontSize: 11
? Colors.yellowAccent
: Colors.white,
fontSize: 11),
),
),
),
new Tab(
icon: Icon(Icons.loyalty,
color: _controller.index == 1
? Colors.yellowAccent: Colors.white),
child:Text(
? Colors.yellowAccent
: Colors.white),
child: Text(
'บริการ',
style: TextStyle(
color: _controller.index == 1
? Colors.yellowAccent: Colors.white,
fontSize: 11
? Colors.yellowAccent
: Colors.white,
fontSize: 11),
),
),
),
new Tab(
icon: Icon(Icons.star,
color: _controller.index == 2
? Colors.yellowAccent: Colors.white),
child:Text(
? Colors.yellowAccent
: Colors.white),
child: Text(
'รีวิว',
style: TextStyle(
color: _controller.index == 2
? Colors.yellowAccent: Colors.white,
fontSize: 11
? Colors.yellowAccent
: Colors.white,
fontSize: 11),
),
),
),
Container(
width: 200,
child: Tab(
icon: Icon(Icons.pin_drop,
color: _controller.index == 3
? Colors.yellowAccent: Colors.white),
child:
Text(
'สถานที่ใกล้เคียง',maxLines: 1,
? Colors.yellowAccent
: Colors.white),
child: Text(
'สถานที่ใกล้เคียง',
maxLines: 1,
style: TextStyle(
color: _controller.index == 3
? Colors.yellowAccent: Colors.white,
fontSize: 9
? Colors.yellowAccent
: Colors.white,
fontSize: 9),
),
),))
))
],
),
),
new Container(
height:double.maxFinite,
height: double.maxFinite,
child: new TabBarView(
controller: _controller,
children: <Widget>[
Container(
color: Colors.black,
color: Colors.deepPurpleAccent,
height: 50,
// child: getlist(),
//width: 20,
......@@ -133,9 +148,8 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
children: <Widget>[
Container(
color: Colors.white,
height: 200,
child:Wrap(
height: 120,
child: Wrap(
alignment: WrapAlignment.start,
spacing: 10.0, // gap between adjacent chips
runSpacing: 5.0, // gap between lines
......@@ -197,7 +211,6 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
"ที่พัก (1)",
style: TextStyle(
color: Colors.white,
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
......@@ -228,18 +241,13 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
),
],
),
),
Container(
color: Colors.green,
// color: Colors.blue,
height: double.maxFinite,
)
child: ShopServicePage(),
),
],
),
// child: getlist(),
//width: 20,
......@@ -254,9 +262,6 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
],
),
),
],
),
);
......@@ -267,7 +272,6 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
children: <Widget>[
Container(
width: double.maxFinite,
color: Colors.white,
child: Container(
padding: EdgeInsets.only(left: SizeConfig.getPadding(24)),
......@@ -373,16 +377,14 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
}
getlist() {
return Container(
padding: EdgeInsets.only(
top: SizeConfig.getPadding(140),
top: SizeConfig.getPadding(100),
left: SizeConfig.getPadding(16),
right: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(10),
),
child:
ListView.builder(
child: ListView.builder(
scrollDirection: Axis.vertical,
itemCount: entries.length,
itemBuilder: (context, i) {
......@@ -401,7 +403,8 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
builder: (context) => NearmeDetail(),
),
);
}, child: Card(
},
child: Card(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
......@@ -551,7 +554,8 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin
height: SizeConfig.getWidth(30),
),
],
), SizedBox(
),
SizedBox(
height: SizeConfig.getWidth(10),
),
],
......
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