Commit 4aea3227 by Mobile : Jetrin Phuekkaew (N'new)

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

parents 0992309f 44deca23
import 'package:feelverapp/ui/account_setting/account_setting_page.dart';
import 'package:feelverapp/ui/my_reviews/my_reviews_page.dart';
import 'package:feelverapp/ui/my_service/my_service_tab.dart';
import 'package:feelverapp/ui/notification/notification_page.dart';
import 'package:feelverapp/ui/other_menu/other_menu_page.dart';
import 'package:feelverapp/ui/shop/shop_main.dart';
import 'package:flutter/material.dart';
import 'ui/splashscreen/splash_screen_page.dart';
......@@ -16,8 +18,9 @@ class MyApp extends StatelessWidget {
theme: ThemeData(
primarySwatch: Colors.blue,
),
// home: NotificationPage(),
home: SplashScreenPage(),
// home: AccountSettingPage(),
home: service_tab(),
// home: SplashScreenPage(),
);
}
}
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:flutter/material.dart';
import 'my_ticket.dart';
class service_tab extends StatefulWidget {
@override
_service_tabState createState() => _service_tabState();
}
class _service_tabState extends State<service_tab> 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);
return Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(140),
child: 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(controller.index==0?'ข้อมูลการจองของฉัน':'ประวัติการใช้บริการของฉัน'
,style: TextStyle(
color: Colors.white,
fontSize: SizeConfig.getFontSize(20),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500)),
elevation: 0,
bottom: getTabBar(),
),
),
body: containTab(),
);
}
TabBar getTabBar() {
return new TabBar(
indicatorColor: Colors.transparent,
controller: controller,
tabs: [
Container(
child: 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: 10
),
),))
],
);
}
TabBarView getTabBarView(var tabs) {
return new TabBarView(
// Add tabs as widgets
children: tabs,
// set the controller
controller: controller,
);
}
Widget containTab(){
return WillPopScope(
///onWillPop: onWillPop,
child: getTabBarView(<Widget>[
myTicketPage(),
Container(
width: double.infinity,
height: double.infinity,
color: Colors.green,
),
Container(
width: double.infinity,
height: double.infinity,
color: Colors.yellow,
),
Container(
width: double.infinity,
height: double.infinity,
color: Colors.blue,
),
]),
);
}
}
import 'package:feelverapp/util/SizeConfig.dart';
import 'package:flutter/material.dart';
class myTicketPage extends StatefulWidget {
@override
_myTicketPageState createState() => _myTicketPageState();
}
class _myTicketPageState extends State<myTicketPage> {
@override
Widget build(BuildContext context) {
SizeConfig(context);
return Container(
child: ListView(
children: <Widget>[
myCard(),
myCard()
],
),
);
}
Widget myCard(){
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.yellow,
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Container(
// color: Colors.blue,
height: SizeConfig.getHeight(200),
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(200),
child: Column(
children: <Widget>[
Expanded(
flex: 3,
child: Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.all(10),
color: Color(0xffEFEFEF),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text("เรามีนัดกันในอีก",style: TextStyle(
color: Color(0xffEEAFB7),
fontSize: SizeConfig.getFontSize(10),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text("11 Days",style: TextStyle(
color: Colors.red,
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
SizedBox(
width: 5,
),
Text("20/04/2019 : 10 AM",style: TextStyle(
color: Color(0xffEEAFB7),
fontSize: SizeConfig.getFontSize(10),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
],
)
],
),
),
),
Expanded(
flex: 4,
child: 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(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(11),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
],
),
),
),
Expanded(
flex: 3,
child: Container(
padding: EdgeInsets.only(left: 10,right: 10),
alignment: Alignment.topLeft,
// color: Colors.blue,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
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),),
],
),
],
),
),
),
],
),
),
),
],
)
),
);
}
}
......@@ -29,8 +29,8 @@ class _myAppBarState extends State<myAppBar> {
// color: Colors.red,
child: Image.asset(
'assets/images/ic_back.png',
width: SizeConfig.getWidth(20),
height: SizeConfig.getWidth(20),
width: SizeConfig.getHeight(20),
height: SizeConfig.getHeight(20),
),
),
],
......
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