Commit 0992309f by Mobile : Jetrin Phuekkaew (N'new)

Merge branch 'develop' of https://gitlab.2fellows.com/art/feelver into develop

parents 03834434 328872f2
import 'package:feelverapp/ui/account_setting/account_setting_page.dart';
import 'package:feelverapp/ui/my_reviews/my_reviews_page.dart';
import 'package:feelverapp/ui/notification/notification_page.dart';
import 'package:feelverapp/ui/other_menu/other_menu_page.dart';
import 'package:flutter/material.dart';
import 'ui/splashscreen/splash_screen_page.dart';
......@@ -14,8 +16,8 @@ class MyApp extends StatelessWidget {
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: AccountSettingPage(),
// home: SplashScreenPage(),
// home: NotificationPage(),
home: SplashScreenPage(),
);
}
}
import 'dart:ui';
import 'package:feelverapp/util/AppBar.dart';
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:feelverapp/util/rating_star.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MyReviewsPage extends StatefulWidget {
@override
_MyReviewsPageState createState() => _MyReviewsPageState();
}
class _MyReviewsPageState extends State<MyReviewsPage> {
double rate=0;
@override
Widget build(BuildContext context) {
SizeConfig(context);
return Scaffold(
body: _setupView(),
);
}
_setupView() {
return Stack(
children: <Widget>[
containt(),
header(),
myAppBar(title: "รีวิวของฉัน",),
],
);
}
Widget containt(){
return Container(
child: Column(
children: <Widget>[
Container(
height: SizeConfig.getHeight(160),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: <Widget>[
SizedBox(height: SizeConfig.getHeight(65),),
Card1(),
Card2(),
],
),
),
),
],
),
);
}
Widget LogoutButton(){
return Container(
// color: Colors.red,
margin: EdgeInsets.only(right: SizeConfig.getPadding(16)+10,left: SizeConfig.getPadding(16)+10,top: SizeConfig.getPadding(10),bottom: SizeConfig.getPadding(30)),
height: SizeConfig.getHeight(40),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: Image.asset("assets/images/Icon_close.png"),
),
SizedBox(
width: 10,
),
Text("ออกจากระบบ",style: TextStyle(
color: Color(0xffEEAFB7),
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
],),
);
}
Widget Card1(){
return Card(
margin: EdgeInsets.only(right: SizeConfig.getPadding(16),left: SizeConfig.getPadding(16),top: SizeConfig.getPadding(10),bottom: SizeConfig.getPadding(25)),
child: Container(
margin: EdgeInsets.only(right: 10,left: 10),
// color: Colors.yellow,
child: Column(
children: <Widget>[
Container(
height: SizeConfig.getHeight(100),
// color: Colors.red,
child: Row(
children: <Widget>[
Container(
width: SizeConfig.getHeight(100),
height: SizeConfig.getHeight(100),
padding: EdgeInsets.all(10),
// color: Colors.yellow,
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Image.network(
'https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-9/104204530_3370427592977187_6031309814586327212_o.jpg?_nc_cat=106&_nc_sid=110474&_nc_eui2=AeE2vpoR5NHZLbG8b3YABiSdSsMCoPYM3W1KwwKg9gzdbZuYqR1gPnkW3tGe-TS2Vtphdvn2OuvO2CdDLaCMVvcI&_nc_ohc=T5EK3sWOgtAAX994m4I&_nc_ht=scontent.fbkk7-2.fna&oh=0b3e434546b19e256c07ecd6a4d499fb&oe=5F098A94',
fit: BoxFit.cover,
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("Thai Body Balance",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
Text("03/16/2019 12:49",
style: TextStyle(
color: Color(0xff6AB3AA),
fontSize: SizeConfig.getFontSize(12),
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(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
],
),
),
),
Container(
padding: EdgeInsets.only(top: 10),
width: 30,
alignment: Alignment.topCenter,
// color: Colors.green,
child: Icon(Icons.more_vert),
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(bottom: SizeConfig.getPadding(25),top: SizeConfig.getPadding(10),left: 10,right: 10),
height: SizeConfig.getHeight(80),
// color: Colors.blue,
child: RaisedButton(
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(180.0)),
child: Text(
"Rete this service",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
color: Color(0xffE8A6B4),
onPressed: () {
}
),
),
],
),
),
);
}
Widget Card2(){
return Card(
margin: EdgeInsets.only(right: SizeConfig.getPadding(16),left: SizeConfig.getPadding(16),top: SizeConfig.getPadding(10),bottom: SizeConfig.getPadding(10)),
child: Container(
margin: EdgeInsets.only(right: 10,left: 10),
// color: Colors.yellow,
child: Column(
children: <Widget>[
Container(
height: SizeConfig.getHeight(100),
// color: Colors.red,
child: Row(
children: <Widget>[
Container(
width: SizeConfig.getHeight(100),
height: SizeConfig.getHeight(100),
padding: EdgeInsets.all(10),
// color: Colors.yellow,
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Image.network(
'https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-9/104204530_3370427592977187_6031309814586327212_o.jpg?_nc_cat=106&_nc_sid=110474&_nc_eui2=AeE2vpoR5NHZLbG8b3YABiSdSsMCoPYM3W1KwwKg9gzdbZuYqR1gPnkW3tGe-TS2Vtphdvn2OuvO2CdDLaCMVvcI&_nc_ohc=T5EK3sWOgtAAX994m4I&_nc_ht=scontent.fbkk7-2.fna&oh=0b3e434546b19e256c07ecd6a4d499fb&oe=5F098A94',
fit: BoxFit.cover,
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("Thai Body Balance",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
Text("03/16/2019 12:49",
style: TextStyle(
color: Color(0xff6AB3AA),
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
SizedBox(
height: 5,
),
Row(
children: <Widget>[
Text("0.0"),
SizedBox(
width: 5,
),
RatingStar(
isRating: true,
rate: rate,
starSize: 20,
onChangeRate: (i){
setState(() {
rate = i;
print(i);
});
},
),
],
),
],
),
),
),
Container(
padding: EdgeInsets.only(top: 10),
width: 30,
alignment: Alignment.topCenter,
// color: Colors.green,
child: Icon(Icons.more_vert),
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(bottom: SizeConfig.getPadding(25),top: SizeConfig.getPadding(10),left: 10,right: 10),
child: Column(
children: <Widget>[
Text("การบริการและบรรยากาศดีมาก มีห้องอาบน้ำพร้อมผ้าเช็ดตัว สบู่ ครีมสระผม พนักงานดูแลเอาใจใส่ และคอยแนะนำตลอดจนถึง therapist มีความเป็นมืออาชีพให้ความผ่อนคลายแก่ลูกค้า",
style: TextStyle(
color: Color(0xff969696),
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
SizedBox(
height: 20,
),
Row(
children: <Widget>[
RaisedButton(
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(180.0)),
child: Text(
"บรการดีมาก",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
color: Color(0xff3694A3),
onPressed: () {
}
),
SizedBox(
width: 10,
),
RaisedButton(
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(180.0)),
child: Text(
"คุ่มค่าดี",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(15),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
color: Color(0xff3694A3),
onPressed: () {
}
),
],
),
],
),
),
],
),
),
);
}
Widget buttonBar(){
return Container(
child: Row(
children: <Widget>[
Expanded(
child: Container(
height: SizeConfig.getHeight(130),
padding: EdgeInsets.only(bottom: SizeConfig.getHeight(10)),
// color: Colors.green,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Image.asset("assets/images/icon_menu1_gray.png",
width: SizeConfig.getWidth(20),
height: SizeConfig.getHeight(30),
fit: BoxFit.cover,),
SizedBox(
height: SizeConfig.getHeight(8),
),
Text("การจองของฉัน",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),)
],
),
),
),
Expanded(
child: Container(
height: SizeConfig.getHeight(130),
padding: EdgeInsets.only(bottom: SizeConfig.getHeight(10)),
// color: Colors.blue,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Image.asset("assets/images/icon_menu2_gray.png",
width: SizeConfig.getWidth(20),
height: SizeConfig.getHeight(30),
fit: BoxFit.cover,),
SizedBox(
height: SizeConfig.getHeight(5),
),
Text("ประวัติการใช้บริการ",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),)
],
),
),
),
Expanded(
child: Container(
height: SizeConfig.getHeight(130),
padding: EdgeInsets.only(bottom: SizeConfig.getHeight(10)),
// color: Colors.red,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Image.asset("assets/images/icon_menu3_gray.png",
width: SizeConfig.getWidth(20),
height: SizeConfig.getHeight(30),
fit: BoxFit.cover,),
SizedBox(
height: SizeConfig.getHeight(5),
),
Text("การแจ้งเตือน",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),)
],
),
),
),
],
),
);
}
Widget header(){
return Container(
height: SizeConfig.getHeight(210),
// color: Colors.amber,
child: Stack(
children: <Widget>[
Column(
children: <Widget>[
Container(
color: Color(0xff6AB3AA),
height: SizeConfig.getHeight(180),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: 85,
height: 85,
margin: EdgeInsets.only(left: SizeConfig.getPadding(16),bottom: 10),
//color: Colors.brown,
),
Expanded(
child: Container(
alignment: Alignment.bottomLeft,
margin: EdgeInsets.only(bottom: 10),
padding: EdgeInsets.only(left: 20),
height: 85,
//color: Colors.red,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("Rataya Pratumkan",style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
SizedBox(
height: 5,
),
SizedBox(
height: 5,
),
],
),
),
),
],
),
)
],
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: 85,
height: 85,
margin: EdgeInsets.only(left: SizeConfig.getPadding(16),bottom: 10),
//color: Colors.brown,
child: ClipRRect(
borderRadius: BorderRadius.circular(50),
child: Image.network(
'https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-9/104204530_3370427592977187_6031309814586327212_o.jpg?_nc_cat=106&_nc_sid=110474&_nc_eui2=AeE2vpoR5NHZLbG8b3YABiSdSsMCoPYM3W1KwwKg9gzdbZuYqR1gPnkW3tGe-TS2Vtphdvn2OuvO2CdDLaCMVvcI&_nc_ohc=T5EK3sWOgtAAX994m4I&_nc_ht=scontent.fbkk7-2.fna&oh=0b3e434546b19e256c07ecd6a4d499fb&oe=5F098A94',
width: 85.0,
height: 85.0,
fit: BoxFit.cover,
),
),
),
],
),
],
),
],
),
);
}
}
import 'dart:ui';
import 'package:feelverapp/util/AppBar.dart';
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:feelverapp/util/rating_star.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class NotificationPage extends StatefulWidget {
@override
_NotificationPageState createState() => _NotificationPageState();
}
class _NotificationPageState extends State<NotificationPage> {
double rate=0;
@override
Widget build(BuildContext context) {
SizeConfig(context);
return Scaffold(
body: _setupView(),
);
}
_setupView() {
return Stack(
children: <Widget>[
containt(),
header(),
myAppBar(title: "การแจ้งเตือน",),
],
);
}
Widget containt(){
return Container(
child: Column(
children: <Widget>[
Container(
height: SizeConfig.getHeight(160),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: <Widget>[
SizedBox(height: SizeConfig.getHeight(65),),
Card1(),
Card1(),
],
),
),
),
],
),
);
}
Widget LogoutButton(){
return Container(
// color: Colors.red,
margin: EdgeInsets.only(right: SizeConfig.getPadding(16)+10,left: SizeConfig.getPadding(16)+10,top: SizeConfig.getPadding(10),bottom: SizeConfig.getPadding(30)),
height: SizeConfig.getHeight(40),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: Image.asset("assets/images/Icon_close.png"),
),
SizedBox(
width: 10,
),
Text("ออกจากระบบ",style: TextStyle(
color: Color(0xffEEAFB7),
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
],),
);
}
Widget Card1(){
return Card(
clipBehavior: Clip.antiAlias,
margin: EdgeInsets.only(right: SizeConfig.getPadding(16),left: SizeConfig.getPadding(16),top: SizeConfig.getPadding(10),bottom: SizeConfig.getPadding(25)),
child: Container(
margin: EdgeInsets.only(right: 0,left: 10),
// color: Colors.yellow,
child: Row(
children: <Widget>[
Expanded(
flex: 9,
child: Container(
height: SizeConfig.getHeight(200),
// color: Colors.red,
child: Column(
children: <Widget>[
Expanded(
flex: 4,
child: Container(
alignment: Alignment.bottomCenter,
// color: Colors.blue,
child: Image.asset("assets/images/icon_feelver_voucher.png"),
),
),
Expanded(
flex: 6,
child: Container(
// color: Colors.yellow,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Text("50%",style: TextStyle(
color: Color(0xff6AB3AA),
fontSize: SizeConfig.getFontSize(45),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500,
fontStyle: FontStyle.italic
),),
Text("OFF",style: TextStyle(
color: Color(0xff6AB3AA),
fontSize: SizeConfig.getFontSize(40),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500,
fontStyle: FontStyle.italic
),),
],
),
),
),
],
),
),
),
Expanded(
flex: 10,
child: Stack(
children: <Widget>[
Container(
height: SizeConfig.getHeight(200),
width: double.infinity,
color: Colors.green,
child: Image.asset(
"assets/images/demo_img.png",
fit: BoxFit.cover,
),
),
Container(
padding: EdgeInsets.only(top: 15,bottom: 15,left: 10,right: 10),
height: SizeConfig.getHeight(200),
width: double.infinity,
color: Color(0xddEEAFB7),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("Voucher Thai Body Balance",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 5,
),
Text("03/16/2019 12:43",
style: TextStyle(
color: Color(0xff6AB3AA),
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 10,
),
Text("จะหมดในอีก 10 วัน อย่าลืมใช้นะคะ",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(14),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 25,
),
],
),
),
Container(
height: SizeConfig.getHeight(200),
padding: EdgeInsets.only(top: 15,bottom: 15,left: 10,right: 10),
alignment: Alignment.bottomCenter,
width: double.infinity,
// color: Colors.green,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
RaisedButton(
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(180.0)),
child: Text(
"ดูข้อมูลการสั่งซื้อ",
style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),
),
color: Color(0xffE8A6B4),
onPressed: () {
}
),
],
),
),
],
),
),
],
),
),
);
}
Widget buttonBar(){
return Container(
child: Row(
children: <Widget>[
Expanded(
child: Container(
height: SizeConfig.getHeight(130),
padding: EdgeInsets.only(bottom: SizeConfig.getHeight(10)),
// color: Colors.green,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Image.asset("assets/images/icon_menu1_gray.png",
width: SizeConfig.getWidth(20),
height: SizeConfig.getHeight(30),
fit: BoxFit.cover,),
SizedBox(
height: SizeConfig.getHeight(8),
),
Text("การจองของฉัน",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),)
],
),
),
),
Expanded(
child: Container(
height: SizeConfig.getHeight(130),
padding: EdgeInsets.only(bottom: SizeConfig.getHeight(10)),
// color: Colors.blue,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Image.asset("assets/images/icon_menu2_gray.png",
width: SizeConfig.getWidth(20),
height: SizeConfig.getHeight(30),
fit: BoxFit.cover,),
SizedBox(
height: SizeConfig.getHeight(5),
),
Text("ประวัติการใช้บริการ",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),)
],
),
),
),
Expanded(
child: Container(
height: SizeConfig.getHeight(130),
padding: EdgeInsets.only(bottom: SizeConfig.getHeight(10)),
// color: Colors.red,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Image.asset("assets/images/icon_menu3_gray.png",
width: SizeConfig.getWidth(20),
height: SizeConfig.getHeight(30),
fit: BoxFit.cover,),
SizedBox(
height: SizeConfig.getHeight(5),
),
Text("การแจ้งเตือน",
style: TextStyle(
color: Colors.black,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),)
],
),
),
),
],
),
);
}
Widget header(){
return Container(
height: SizeConfig.getHeight(210),
// color: Colors.amber,
child: Stack(
children: <Widget>[
Column(
children: <Widget>[
Container(
color: Color(0xff6AB3AA),
height: SizeConfig.getHeight(180),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: 85,
height: 85,
margin: EdgeInsets.only(left: SizeConfig.getPadding(16),bottom: 10),
//color: Colors.brown,
),
Expanded(
child: Container(
alignment: Alignment.bottomLeft,
margin: EdgeInsets.only(bottom: 10),
padding: EdgeInsets.only(left: 20),
height: 85,
//color: Colors.red,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("Rataya Pratumkan",style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
SizedBox(
height: 5,
),
SizedBox(
height: 5,
),
],
),
),
),
],
),
)
],
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: 85,
height: 85,
margin: EdgeInsets.only(left: SizeConfig.getPadding(16),bottom: 10),
//color: Colors.brown,
child: ClipRRect(
borderRadius: BorderRadius.circular(50),
child: Image.network(
'https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-9/104204530_3370427592977187_6031309814586327212_o.jpg?_nc_cat=106&_nc_sid=110474&_nc_eui2=AeE2vpoR5NHZLbG8b3YABiSdSsMCoPYM3W1KwwKg9gzdbZuYqR1gPnkW3tGe-TS2Vtphdvn2OuvO2CdDLaCMVvcI&_nc_ohc=T5EK3sWOgtAAX994m4I&_nc_ht=scontent.fbkk7-2.fna&oh=0b3e434546b19e256c07ecd6a4d499fb&oe=5F098A94',
width: 85.0,
height: 85.0,
fit: BoxFit.cover,
),
),
),
],
),
],
),
],
),
);
}
}
import 'package:feelverapp/ui/nearme/near_me_detail.dart';
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MainShop extends StatefulWidget {
@override
_MainShopState createState() => new _MainShopState();
}
final List<String> entries = <String>['A', 'B', 'C'];
class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin {
TabController _controller;
@override
void initState() {
super.initState();
_controller = new TabController(length: 4, vsync: this);
_controller.addListener(_handleTabSelection);
}
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
) ,),
elevation: 0,
),
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),),
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(
'ข้อมูลร้าน',
style: TextStyle(
color: _controller.index == 0
? Colors.yellowAccent: Colors.white,
fontSize: 11
),
),
),
new Tab(
icon: Icon(Icons.loyalty,
color: _controller.index == 1
? Colors.yellowAccent: Colors.white),
child:Text(
'บริการ',
style: TextStyle(
color: _controller.index == 1
? Colors.yellowAccent: Colors.white,
fontSize: 11
),
),
),
new Tab(
icon: Icon(Icons.star,
color: _controller.index == 2
? Colors.yellowAccent: Colors.white),
child:Text(
'รีวิว',
style: TextStyle(
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
),
),))
],
),
),
new Container(
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");
},
),
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,
),
setupView()
],
),
),
],
),
);
}
setupView() {
return Stack(
children: <Widget>[
Container(
width: double.maxFinite,
color: Colors.white,
child: Container(
padding: EdgeInsets.only(left: SizeConfig.getPadding(24)),
alignment: Alignment.topLeft,
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,
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");
},
),
],
),
),
),
getlist(),
],
);
}
getlist() {
return Container(
padding: EdgeInsets.only(
top: SizeConfig.getPadding(140),
left: SizeConfig.getPadding(16),
right: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(10),
),
child:
ListView.builder(
scrollDirection: Axis.vertical,
itemCount: entries.length,
itemBuilder: (context, i) {
return _nearByItem(entries[i]);
},
),
);
}
Widget _nearByItem(String title) {
return InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => NearmeDetail(),
),
);
}, child: Card(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Image.network(
'https://scontent.fbkk2-8.fna.fbcdn.net/v/t1.0-9/66224920_2384272051596091_1094623379467534336_n.jpg?_nc_cat=102&_nc_sid=85a577&_nc_eui2=AeElfU4QES6XQW0XzlV5G9zQ-F-e_QdADw_4X579B0APD-UJsAV-PuXX-iMA6hWVLgUUmCNm5HTgTMw_q4YARQm8&_nc_ohc=do7yQl7hf74AX8-8Yk-&_nc_ht=scontent.fbkk2-8.fna&oh=140482c64ecf1893bf59498dfff5f592&oe=5EFAC9CF',
width: SizeConfig.getWidth(110),
height: SizeConfig.getHeight(150),
fit: BoxFit.fitWidth,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
child: Text(
'ซีไลฟ์ แบงคอก โอเชียน เวิลด์',
style: TextStyle(
color: Colors.black87,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w700),
),
padding: EdgeInsets.only(
top: SizeConfig.getPadding(16),
left: SizeConfig.getPadding(16),
right: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(4)),
),
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(0),
left: SizeConfig.getPadding(16),
bottom: SizeConfig.getPadding(4)),
),
Row(
children: <Widget>[
SizedBox(
width: SizeConfig.getWidth(16),
),
ImageIcon(
AssetImage('assets/images/pin_drop.png'),
color: Colors.black54,
size: SizeConfig.getFontSize(16),
),
SizedBox(
width: SizeConfig.getWidth(4),
),
Text(
'54 km',
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: SizeConfig.getFontSize(12),
color: Colors.black54,
),
),
],
),
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),
),
],
),
),
],
),
),
);
}
}
import 'package:flutter/material.dart';
import 'SizeConfig.dart';
class RatingStar extends StatelessWidget {
final double rate;
final double starSize;
final bool isRating;
final Function onChangeRate;
RatingStar({
@required this.rate,
this.isRating = false,
this.starSize = 16,
this.onChangeRate,
});
@override
Widget build(BuildContext context) {
return Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [1.0, 2.0, 3.0, 4.0, 5.0].map((index) {
return GestureDetector(
onTap: !this.isRating
? null
: () {
onChangeRate(index);
},
child: _star(context, index),
);
}).toList(),
),
);
}
Widget _star(BuildContext context, double index) {
if (index <= rate) {
return Icon(Icons.star,
color: Colors.yellow,
size: SizeConfig.getFontSize(this.starSize));
} else if (index > rate && index < rate + 1) {
return Icon(Icons.star,
color: Colors.yellow,
size: SizeConfig.getFontSize(this.starSize));
} else {
return Icon(Icons.star_border,
color: Colors.yellow,
size: SizeConfig.getFontSize(this.starSize));
}
}
}
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