no message

parent 62b11248
import 'package:feelverapp/ui/nearme/near_me_detail.dart';
import 'package:feelverapp/ui/shop/shop_Nearby_places.dart'; import 'package:feelverapp/ui/shop/shop_Nearby_places.dart';
import 'package:feelverapp/ui/shop/shop_reviews.dart'; import 'package:feelverapp/ui/shop/shop_reviews.dart';
import 'package:feelverapp/ui/shop/shop_service.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/material.dart'; import 'package:flutter/material.dart';
import 'dart:math';
class MainShop extends StatefulWidget { class MainShop extends StatefulWidget {
MainShop({Key key, this.title}) : super(key: key);
final String title;
@override @override
_MainShopState createState() => new _MainShopState(); _MainShopState createState() => _MainShopState();
} }
final List<String> entries = <String>['A', 'B', 'C']; class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixin /*<-- This is for the controllers*/ {
TabController _controller; // To control switching tabs
ScrollController _scrollViewController; // To control scrolling
List<String> items = [];
List<Color> colors = [Colors.red, Colors.green, Colors.yellow, Colors.purple, Colors.blue, Colors.amber, Colors.cyan, Colors.pink];
Random random = new Random();
class _MainShopState extends State<MainShop> Color getRandomColor() {
with SingleTickerProviderStateMixin { return colors.elementAt(random.nextInt(colors.length));
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);
_scrollViewController =ScrollController();
}
void _handleTabSelection() {
setState(() {});
} }
@override @override
void dispose() { void dispose() {
// TODO: implement dispose
_controller.dispose();
super.dispose(); super.dispose();
} _controller.dispose();
_scrollViewController.dispose();
void _handleTabSelection() {
setState(() {});
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
SizeConfig(context); SizeConfig(context);
return new Scaffold( // Init the items
for (var i = 0; i < 100; i++) {
items.add('Item $i');
}
return Scaffold(
// backgroundColor: Colors.transparent,
body: NestedScrollView(
controller: _scrollViewController,
headerSliverBuilder: (BuildContext context, bool boxIsScrolled) {
return <Widget>[
SliverAppBar(
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
appBar: new AppBar(
leading: IconButton( leading: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.white), icon: Icon(Icons.arrow_back_ios, color: Colors.white),
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
), ),
backgroundColor: Color.fromRGBO(106, 179, 170, 1), title: Text("Thai Body Balance"),
title: new Text( floating: true,
'Thai Body Balance', pinned: false,
style: TextStyle(color: Colors.white, fontSize: 25), snap: true,
), bottom: new TabBar(
elevation: 0,
),
body: new ListView(
children: <Widget>[
// new Card(
// child: new ListTile(
// title: const Text('Some information'),
// ),
// ),
new Container( indicatorColor:Colors.transparent,
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, controller: _controller,
tabs: [ tabs: [
new Tab( new Tab(
...@@ -131,8 +142,9 @@ class _MainShopState extends State<MainShop> ...@@ -131,8 +142,9 @@ class _MainShopState extends State<MainShop>
], ],
), ),
), ),
];
new Container( },
body: new Container(
height: double.maxFinite, height: double.maxFinite,
child: new TabBarView( child: new TabBarView(
controller: _controller, controller: _controller,
...@@ -242,11 +254,13 @@ class _MainShopState extends State<MainShop> ...@@ -242,11 +254,13 @@ class _MainShopState extends State<MainShop>
], ],
), ),
), ),
Container( Expanded(
// color: Colors.blue, child: Container(
height: double.maxFinite, // color: Colors.blue,
// height: double.maxFinite,
child: ShopServicePage(), child: ShopServicePage(),
), ),
),
], ],
), ),
// child: getlist(), // child: getlist(),
...@@ -268,8 +282,8 @@ class _MainShopState extends State<MainShop> ...@@ -268,8 +282,8 @@ class _MainShopState extends State<MainShop>
], ],
), ),
), ),
],
), ),
); );
} }
} }
\ No newline at end of file
...@@ -418,7 +418,7 @@ class _ShopReviewsPageState extends State<ShopReviewsPage> { ...@@ -418,7 +418,7 @@ class _ShopReviewsPageState extends State<ShopReviewsPage> {
color: Colors.black), color: Colors.black),
), ),
SizedBox( SizedBox(
width: SizeConfig.getWidth(60), width: SizeConfig.getWidth(35),
), ),
Icon(Icons.more_vert), Icon(Icons.more_vert),
], ],
...@@ -579,7 +579,7 @@ class _ShopReviewsPageState extends State<ShopReviewsPage> { ...@@ -579,7 +579,7 @@ class _ShopReviewsPageState extends State<ShopReviewsPage> {
color: Colors.black), color: Colors.black),
), ),
SizedBox( SizedBox(
width: SizeConfig.getWidth(60), width: SizeConfig.getWidth(35),
), ),
Icon(Icons.more_vert), Icon(Icons.more_vert),
], ],
......
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