update shop_main,edit shop_service

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