update shop_main,edit shop_service

parent 6926c554
......@@ -20,130 +20,7 @@ class _MyOrderStatusState extends State<MyOrderStatus> {
_setupView() {
return Column(
children: <Widget>[
Stack(
children: <Widget>[
Container(
color: Color.fromRGBO(69, 85, 79, 1),
height: SizeConfig.getHeight(270),
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,
),
),
),
Positioned(
top: SizeConfig.getPadding(150),
child: Container(
padding: EdgeInsets.only(left: 20),
child: Row(
children: <Widget>[
Column(
children: <Widget>[
Image.asset('assets/images/ic_NotInUse.png'),
Text('ยังไม่ได้ใช้งาน',style: TextStyle(
color: Color(0xFFEEAFB7),
fontSize: SizeConfig.getFontSize(12),
),),
],
),
SizedBox(width: SizeConfig.getWidth(45),),
Column(
children: <Widget>[
Image.asset('assets/images/ic_check.png',),
Text(
'บริการที่พร้อมใช้',
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(12),
),
),
],
),
SizedBox(width: SizeConfig.getWidth(45),),
Column(
children: <Widget>[
Image.asset(
'assets/images/ic_like.png',
width: 25,
height: 25,
),
Text(
'บริการที่เเล้วเสร็จ',
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(12),
),
),
],
),
],
),
),
),
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,
),
),
),
),
],
),
header(),
_getlist(),
],
);
......@@ -166,14 +43,14 @@ class _MyOrderStatusState extends State<MyOrderStatus> {
child: ListView.builder(
itemCount: entries.length,
itemBuilder: (context, i) {
return _shopItem(entries[i]);
return _listItem(entries[i]);
},
),
),
);
}
Widget _shopItem(String title) {
Widget _listItem(String title) {
return Card(
child: Column(
children: <Widget>[
......@@ -381,4 +258,146 @@ class _MyOrderStatusState extends State<MyOrderStatus> {
),
);
}
Widget header() {
return Container(
child: Stack(
children: <Widget>[
Container(
color: Color.fromRGBO(69, 85, 79, 1),
height: SizeConfig.getHeight(270),
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,
),
),
),
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(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,
),
),
),
Positioned(
top: SizeConfig.getPadding(150),
child: Container(
padding: EdgeInsets.only(left: 20),
child: Row(
children: <Widget>[
Column(
children: <Widget>[
Image.asset('assets/images/ic_NotInUse.png'),
Text('ยังไม่ได้ใช้งาน',style: TextStyle(
color: Color(0xFFEEAFB7),
fontSize: SizeConfig.getFontSize(12),
),),
],
),
SizedBox(width: SizeConfig.getWidth(45),),
Column(
children: <Widget>[
Image.asset('assets/images/ic_check.png',),
Text(
'บริการที่พร้อมใช้',
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(12),
),
),
],
),
SizedBox(width: SizeConfig.getWidth(45),),
Column(
children: <Widget>[
Image.asset(
'assets/images/ic_like.png',
width: 25,
height: 25,
),
Text(
'บริการที่เเล้วเสร็จ',
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(12),
),
),
],
),
],
),
),
),
],
),
);
}
}
import 'package:feelverapp/ui/menu/menu.dart';
import 'package:feelverapp/ui/payment/payment_page.dart';
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:flutter/material.dart';
class MyCart extends StatefulWidget {
@override
_MyCartState createState() => _MyCartState();
}
class _MyCartState extends State<MyCart> {
bool checkBoxValue = false;
int a = 1;
int b = 1;
@override
Widget build(BuildContext context) {
SizeConfig(context);
return Scaffold(
body: _setupView(),
bottomNavigationBar: Container(
color: Color.fromRGBO(69, 85, 79, 1),
height: SizeConfig.getWidth(150),
child: Column(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: SizeConfig.getPadding(15), top: 17),
child: Row(
children: <Widget>[
Icon(
Icons.local_offer,
color: Colors.white,
),
Padding(
padding: const EdgeInsets.only(left: 7, right: 12),
child: Text(
'โค้ดส่วนลด',
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(16),
),
),
),
Container(
height: 40,
width: 200,
color: Colors.white,
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
),
),
),
IconButton(
icon: Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
size: 40,
),
alignment: Alignment(0, 0),
onPressed: () {}),
],
),
),
Divider(
color: Colors.white,
height: 35,
indent: 20,
endIndent: 20,
),
Container(
child: Row(
children: <Widget>[
SizedBox(
width: SizeConfig.getWidth(12),
),
Checkbox(
checkColor: Color(0xFFEEAFB7),
activeColor: Colors.white,
value: checkBoxValue,
onChanged: (bool value) {
setState(() {
print(value);
checkBoxValue = value;
});
}),
Text(
'เลือกทั้งหมด',
style: TextStyle(
color: Colors.white,
fontSize: 16,
),
),
Container(
child: Padding(
padding: const EdgeInsets.only(left: 25),
child: Column(
children: <Widget>[
Text(
'รวมทั้งหมด',
style: TextStyle(
color: Colors.white,
fontSize: 16,
),
),
Text(
'฿2,000',
style: TextStyle(
color: Color(0xFFEEAFB7),
fontSize: 24,
),
),
],
),
),
),
Container(
child: Padding(
padding: const EdgeInsets.only(left: 25),
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25.0),
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Payment(),
),
);
},
padding: EdgeInsets.only(
left: 35,
right: 35,
top: 15,
bottom: 15,
),
color: Color(0xFFEEAFB7),
child: Text(
'สั่งซื้อ',
style: TextStyle(
fontSize: 16,
color: Colors.white,
),
),
),
),
),
],
),
),
],
),
),
);
}
_setupView() {
return Column(
children: <Widget>[
header(),
containt(),
],
);
}
Widget containt() {
return Expanded(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.only(
left: 10,
right: 10,
top: 8,
bottom: 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: 40,
indent: 8,
endIndent: 20,
),
// list3(),
],
),
),
),
),
);
}
Widget list1() {
return Card(child: Container(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Image.asset(
'assets/images/no-image.png',
height: SizeConfig.getHeight(80),
width: SizeConfig.getWidth(80),
),
Padding(
padding: const EdgeInsets.only(left: 8),
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Text(
'Ivory Relax and Spa',
style: TextStyle(
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
SizedBox(
width: SizeConfig.getWidth(60),
),
Icon(
Icons.delete,
color: Colors.black,
),
],
),
Text(
'นวดแผนไทย',
style: TextStyle(
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
color: Colors.black,
),
),
SizedBox(
height: SizeConfig.getHeight(10),
),
Row(
children: <Widget>[
Row(
children: <Widget>[
Image.asset(
'assets/images/clock.png',
height: SizeConfig.getHeight(20),
width: SizeConfig.getWidth(20),
),
Text(
' 90 นาที',
style: TextStyle(
fontFamily: "SF_Pro_Text",
),
),
SizedBox(
width: SizeConfig.getWidth(90),
),
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(10),
),
Row(
children: <Widget>[
Container(
child: Padding(
padding: const EdgeInsets.only(left: 10),
child: Row(
children: <Widget>[
SizedBox(
width: SizeConfig.getPadding(20),
height: SizeConfig.getPadding(20),
child: RaisedButton(
child: Text('-'),
padding: EdgeInsets.only(right: 0),
onPressed: () {
setState(() {
a = a - 1;
});
},
),
),
Padding(
padding: const EdgeInsets.only(
right: 8, left: 8),
child: Text(
'$a',
style: TextStyle(
fontSize: SizeConfig.getFontSize(12),
),
),
),
SizedBox(
width: SizeConfig.getPadding(20),
height: SizeConfig.getPadding(20),
child: RaisedButton(
child: Text('+'),
padding: EdgeInsets.only(right: 0),
onPressed: () {
setState(() {
a = a + 1;
});
},
),
),
],
),
),
),
SizedBox(
width: SizeConfig.getWidth(80),
),
Text(
'฿1,200.00',
style: TextStyle(
fontSize: SizeConfig.getFontSize(20),
color: Color(0xFFFD2956),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.bold,
),
),
],
),
SizedBox(
height: SizeConfig.getHeight(15),
),
],
),
),
),
],
),
],
),
),);
}
Widget list2() {
return Card(child: Container(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Image.asset(
'assets/images/no-image.png',
height: SizeConfig.getHeight(80),
width: SizeConfig.getWidth(80),
),
Padding(
padding: const EdgeInsets.only(left: 8),
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Text(
'Ivory Relax and Spa',
style: TextStyle(
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
SizedBox(
width: SizeConfig.getWidth(60),
),
Icon(
Icons.delete,
color: Colors.black,
),
],
),
Text(
'นวดแผนไทย',
style: TextStyle(
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
color: Colors.black,
),
),
SizedBox(
height: SizeConfig.getHeight(10),
),
Row(
children: <Widget>[
Row(
children: <Widget>[
Image.asset(
'assets/images/clock.png',
height: SizeConfig.getHeight(20),
width: SizeConfig.getWidth(20),
),
Text(
' 90 นาที',
style: TextStyle(
fontFamily: "SF_Pro_Text",
),
),
SizedBox(
width: SizeConfig.getWidth(90),
),
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(10),
),
Row(
children: <Widget>[
Container(
child: Padding(
padding: const EdgeInsets.only(left: 10),
child: Row(
children: <Widget>[
SizedBox(
width: SizeConfig.getPadding(20),
height: SizeConfig.getPadding(20),
child: RaisedButton(
child: Text('-'),
padding: EdgeInsets.only(right: 0),
onPressed: () {
setState(() {
b = b - 1;
});
},
),
),
Padding(
padding: const EdgeInsets.only(
right: 8, left: 8),
child: Text(
'$b',
style: TextStyle(
fontSize: SizeConfig.getFontSize(12),
),
),
),
SizedBox(
width: SizeConfig.getPadding(20),
height: SizeConfig.getPadding(20),
child: RaisedButton(
child: Text('+'),
padding: EdgeInsets.only(right: 0),
onPressed: () {
setState(() {
b = b + 1;
});
},
),
),
],
),
),
),
SizedBox(
width: SizeConfig.getWidth(80),
),
Text(
'฿1,000.00',
style: TextStyle(
fontSize: SizeConfig.getFontSize(20),
color: Color(0xFFFD2956),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.bold,
),
),
],
),
SizedBox(
height: SizeConfig.getHeight(15),
),
],
),
),
),
],
),
],
),
),);
}
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,
),
),
),
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,
),
),
),
),
],
),
);
}
}
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,256 +8,260 @@ 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);
_controller.addListener(_handleTabSelection);
}
void _handleTabSelection() {
setState(() {
});
}
@override
void dispose() {
// TODO: implement dispose
_controller.dispose();
super.dispose();
}
void _handleTabSelection() {
setState(() {
});
}
@override
Widget build(BuildContext context) {
SizeConfig(context);
return new Scaffold(
appBar: new AppBar(
leading: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.white),
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
) ,),
icon: Icon(Icons.arrow_back_ios, color: Colors.white),
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),
),
elevation: 0,
),
body:
new ListView(
body: new ListView(
children: <Widget>[
// new Card(
// child: new ListTile(
// title: const Text('Some information'),
// ),
// ),
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
),
color: _controller.index == 0
? Colors.yellowAccent
: Colors.white,
fontSize: 11),
),
),
new Tab(
),
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
),
color: _controller.index == 1
? Colors.yellowAccent
: Colors.white,
fontSize: 11),
),
),
new Tab(
),
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
),
color: _controller.index == 2
? 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,
style: TextStyle(
color: _controller.index == 3
? Colors.yellowAccent: Colors.white,
fontSize: 9
),
),))
),
Container(
width: 200,
child: Tab(
icon: Icon(Icons.pin_drop,
color: _controller.index == 3
? Colors.yellowAccent
: Colors.white),
child: Text(
'สถานที่ใกล้เคียง',
maxLines: 1,
style: TextStyle(
color: _controller.index == 3
? 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,
height: 50,
// child: getlist(),
//width: 20,
),
Column(
children: <Widget>[
Container(
color: Colors.white,
height: 200,
child:Wrap(
alignment: WrapAlignment.start,
spacing: 10.0, // gap between adjacent chips
runSpacing: 5.0, // gap between lines
children: <Widget>[
FilterChip(
label: Text(
"ทั้งหมด (10)",
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");
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");
},
Container(
color: Colors.deepPurpleAccent,
height: 50,
// child: getlist(),
//width: 20,
),
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");
},
),
],
),
Column(
children: <Widget>[
Container(
color: Colors.white,
height: 120,
child: Wrap(
alignment: WrapAlignment.start,
spacing: 10.0, // gap between adjacent chips
runSpacing: 5.0, // gap between lines
children: <Widget>[
FilterChip(
label: Text(
"ทั้งหมด (10)",
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");
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");
},
),
],
),
Container(
color: Colors.green,
height: double.maxFinite,
)
],
),
// child: getlist(),
//width: 20,
Container(
color: Colors.red,
height: 50,
// child: getlist(),
//width: 20,
Container(
// color: Colors.blue,
height: double.maxFinite,
child: ShopServicePage(),
),
setupView()
],
),
// child: getlist(),
//width: 20,
Container(
color: Colors.red,
height: 50,
// child: getlist(),
//width: 20,
),
setupView()
],
),
),
],
),
);
......@@ -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),
),
],
......
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:feelverapp/util/rating_star.dart';
import 'package:flutter/material.dart';
class ShopServicePage extends StatefulWidget {
@override
_ShopServicePageState createState() => _ShopServicePageState();
}
class _ShopServicePageState extends State<ShopServicePage> {
double rate1 = 0;
double rate2 = 0;
double rate3 = 0;
double rate4 = 0;
double rate5 = 0;
@override
Widget build(BuildContext context) {
SizeConfig(context);
return Container(
child: ListView(
children: <Widget>[
Card1(),
Card2(),
Card3(),
Card4(),
Card5(),
],
),
);
}
Widget Card1() {
return Card(
margin: EdgeInsets.only(
right: SizeConfig.getPadding(16),
left: SizeConfig.getPadding(16),
top: SizeConfig.getPadding(20),
bottom: SizeConfig.getPadding(10)),
child: Container(
margin: EdgeInsets.only(right: 15, left: 15, bottom: 20, top: 20),
// color: Colors.blueGrey,
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 3,
child: Container(
// color: Colors.blue,
height: SizeConfig.getHeight(250),
child: Image.asset(
"assets/images/demo_img.png",
fit: BoxFit.cover,
),
),
),
Expanded(
flex: 5,
child: Container(
margin: EdgeInsets.only(left: 15),
// color: Colors.yellow,
height: SizeConfig.getHeight(250),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(10),
alignment: Alignment.topLeft,
// color: Colors.red,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Thai Body Balance",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
SizedBox(
height: 5,
),
Text(
"SPA Cenvaree @ Centara Grand CentralWorld Bangkok",
style: TextStyle(
color: Color(0xff969696),
fontSize: SizeConfig.getFontSize(11),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
),
Container(
padding: EdgeInsets.only(left: 10, right: 10),
alignment: Alignment.topLeft,
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>[
Icon(
Icons.access_time,
color: Color(0xffEEAFB7),
),
SizedBox(
width: 5,
),
Text(
"150 Min",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(13),
fontFamily: "SF_Pro_Text",
),
),
],
),
SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(
"฿599.0",
style: TextStyle(
fontSize: SizeConfig.getFontSize(12),
decoration: TextDecoration.lineThrough,
),
),
SizedBox(
width: 15,
),
Text(
"฿199.00",
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
SizedBox(height: SizeConfig.getHeight(5),),
RatingStar(
isRating: true,
rate: rate1,
starSize: 20,
onChangeRate: (i){
setState(() {
rate1 = i;
print(i);
});
},
),
],
),
),
],
),
),
),
],
),
],
),
),
);
}
Widget Card2() {
return Card(
margin: EdgeInsets.only(
right: SizeConfig.getPadding(16),
left: SizeConfig.getPadding(16),
top: SizeConfig.getPadding(20),
bottom: SizeConfig.getPadding(10)),
child: Container(
margin: EdgeInsets.only(right: 15, left: 15, bottom: 20, top: 20),
// color: Colors.blueGrey,
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 3,
child: Container(
// color: Colors.blue,
height: SizeConfig.getHeight(250),
child: Image.asset(
"assets/images/demo_img.png",
fit: BoxFit.cover,
),
),
),
Expanded(
flex: 5,
child: Container(
margin: EdgeInsets.only(left: 15),
// color: Colors.yellow,
height: SizeConfig.getHeight(250),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(10),
alignment: Alignment.topLeft,
// color: Colors.red,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Thai Body Balance",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
SizedBox(
height: 5,
),
Text(
"SPA Cenvaree @ Centara Grand CentralWorld Bangkok",
style: TextStyle(
color: Color(0xff969696),
fontSize: SizeConfig.getFontSize(11),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
),
Container(
padding: EdgeInsets.only(left: 10, right: 10),
alignment: Alignment.topLeft,
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>[
Icon(
Icons.access_time,
color: Color(0xffEEAFB7),
),
SizedBox(
width: 5,
),
Text(
"150 Min",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(13),
fontFamily: "SF_Pro_Text",
),
),
],
),
SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(
"฿599.0",
style: TextStyle(
fontSize: SizeConfig.getFontSize(12),
decoration: TextDecoration.lineThrough,
),
),
SizedBox(
width: 15,
),
Text(
"฿199.00",
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
SizedBox(height: SizeConfig.getHeight(5),),
RatingStar(
isRating: true,
rate: rate2,
starSize: 20,
onChangeRate: (i){
setState(() {
rate2 = i;
print(i);
});
},
),
],
),
),
],
),
),
),
],
),
],
),
),
);
}
Widget Card3() {
return Card(
margin: EdgeInsets.only(
right: SizeConfig.getPadding(16),
left: SizeConfig.getPadding(16),
top: SizeConfig.getPadding(20),
bottom: SizeConfig.getPadding(10)),
child: Container(
margin: EdgeInsets.only(right: 15, left: 15, bottom: 20, top: 20),
// color: Colors.blueGrey,
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 3,
child: Container(
// color: Colors.blue,
height: SizeConfig.getHeight(250),
child: Image.asset(
"assets/images/demo_img.png",
fit: BoxFit.cover,
),
),
),
Expanded(
flex: 5,
child: Container(
margin: EdgeInsets.only(left: 15),
// color: Colors.yellow,
height: SizeConfig.getHeight(250),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(10),
alignment: Alignment.topLeft,
// color: Colors.red,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Thai Body Balance",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
SizedBox(
height: 5,
),
Text(
"SPA Cenvaree @ Centara Grand CentralWorld Bangkok",
style: TextStyle(
color: Color(0xff969696),
fontSize: SizeConfig.getFontSize(11),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
),
Container(
padding: EdgeInsets.only(left: 10, right: 10),
alignment: Alignment.topLeft,
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>[
Icon(
Icons.access_time,
color: Color(0xffEEAFB7),
),
SizedBox(
width: 5,
),
Text(
"150 Min",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(13),
fontFamily: "SF_Pro_Text",
),
),
],
),
SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(
"฿599.0",
style: TextStyle(
fontSize: SizeConfig.getFontSize(12),
decoration: TextDecoration.lineThrough,
),
),
SizedBox(
width: 15,
),
Text(
"฿199.00",
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
SizedBox(height: SizeConfig.getHeight(5),),
RatingStar(
isRating: true,
rate: rate3,
starSize: 20,
onChangeRate: (i){
setState(() {
rate3 = i;
print(i);
});
},
),
],
),
),
],
),
),
),
],
),
],
),
),
);
}
Widget Card4() {
return Card(
margin: EdgeInsets.only(
right: SizeConfig.getPadding(16),
left: SizeConfig.getPadding(16),
top: SizeConfig.getPadding(20),
bottom: SizeConfig.getPadding(10)),
child: Container(
margin: EdgeInsets.only(right: 15, left: 15, bottom: 20, top: 20),
// color: Colors.blueGrey,
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 3,
child: Container(
// color: Colors.blue,
height: SizeConfig.getHeight(250),
child: Image.asset(
"assets/images/demo_img.png",
fit: BoxFit.cover,
),
),
),
Expanded(
flex: 5,
child: Container(
margin: EdgeInsets.only(left: 15),
// color: Colors.yellow,
height: SizeConfig.getHeight(250),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(10),
alignment: Alignment.topLeft,
// color: Colors.red,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Thai Body Balance",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
SizedBox(
height: 5,
),
Text(
"SPA Cenvaree @ Centara Grand CentralWorld Bangkok",
style: TextStyle(
color: Color(0xff969696),
fontSize: SizeConfig.getFontSize(11),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
),
Container(
padding: EdgeInsets.only(left: 10, right: 10),
alignment: Alignment.topLeft,
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>[
Icon(
Icons.access_time,
color: Color(0xffEEAFB7),
),
SizedBox(
width: 5,
),
Text(
"150 Min",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(13),
fontFamily: "SF_Pro_Text",
),
),
],
),
SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(
"฿599.0",
style: TextStyle(
fontSize: SizeConfig.getFontSize(12),
decoration: TextDecoration.lineThrough,
),
),
SizedBox(
width: 15,
),
Text(
"฿199.00",
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
SizedBox(height: SizeConfig.getHeight(5),),
RatingStar(
isRating: true,
rate: rate4,
starSize: 20,
onChangeRate: (i){
setState(() {
rate4 = i;
print(i);
});
},
),
],
),
),
],
),
),
),
],
),
],
),
),
);
}
Widget Card5() {
return Card(
margin: EdgeInsets.only(
right: SizeConfig.getPadding(16),
left: SizeConfig.getPadding(16),
top: SizeConfig.getPadding(20),
bottom: SizeConfig.getPadding(10)),
child: Container(
margin: EdgeInsets.only(right: 15, left: 15, bottom: 20, top: 20),
// color: Colors.blueGrey,
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 3,
child: Container(
// color: Colors.blue,
height: SizeConfig.getHeight(250),
child: Image.asset(
"assets/images/demo_img.png",
fit: BoxFit.cover,
),
),
),
Expanded(
flex: 5,
child: Container(
margin: EdgeInsets.only(left: 15),
// color: Colors.yellow,
height: SizeConfig.getHeight(250),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(10),
alignment: Alignment.topLeft,
// color: Colors.red,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Thai Body Balance",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
SizedBox(
height: 5,
),
Text(
"SPA Cenvaree @ Centara Grand CentralWorld Bangkok",
style: TextStyle(
color: Color(0xff969696),
fontSize: SizeConfig.getFontSize(11),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
),
Container(
padding: EdgeInsets.only(left: 10, right: 10),
alignment: Alignment.topLeft,
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>[
Icon(
Icons.access_time,
color: Color(0xffEEAFB7),
),
SizedBox(
width: 5,
),
Text(
"150 Min",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(13),
fontFamily: "SF_Pro_Text",
),
),
],
),
SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(
"฿599.0",
style: TextStyle(
fontSize: SizeConfig.getFontSize(12),
decoration: TextDecoration.lineThrough,
),
),
SizedBox(
width: 15,
),
Text(
"฿199.00",
style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
],
),
SizedBox(height: SizeConfig.getHeight(5),),
RatingStar(
isRating: true,
rate: rate5,
starSize: 20,
onChangeRate: (i){
setState(() {
rate5 = i;
print(i);
});
},
),
],
),
),
],
),
),
),
],
),
],
),
),
);
}
}
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