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_reviews.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';
import 'dart:math';
class MainShop extends StatefulWidget {
MainShop({Key key, this.title}) : super(key: key);
final String title;
@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
class _MainShopState extends State<MainShop>
with SingleTickerProviderStateMixin {
TabController _controller;
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();
Color getRandomColor() {
return colors.elementAt(random.nextInt(colors.length));
}
@override
void initState() {
// TODO: implement initState
super.initState();
_controller = new TabController(length: 4, vsync: this);
_controller.addListener(_handleTabSelection);
_controller.addListener(_handleTabSelection);
_scrollViewController =ScrollController();
}
void _handleTabSelection() {
setState(() {});
}
@override
void dispose() {
// TODO: implement dispose
_controller.dispose();
super.dispose();
}
void _handleTabSelection() {
setState(() {});
_controller.dispose();
_scrollViewController.dispose();
}
@override
Widget build(BuildContext context) {
SizeConfig(context);
return new Scaffold(
SizeConfig(context);
// Init the items
for (var i = 0; i < 100; i++) {
items.add('Item $i');
}
return Scaffold(
// backgroundColor: Colors.transparent,
appBar: new AppBar(
body: NestedScrollView(
controller: _scrollViewController,
headerSliverBuilder: (BuildContext context, bool boxIsScrolled) {
return <Widget>[
SliverAppBar(
backgroundColor: Color.fromRGBO(106, 179, 170, 1),
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,
title: Text("Thai Body Balance"),
floating: true,
pinned: false,
snap: true,
bottom: new TabBar(
indicatorColor:Colors.transparent,
controller: _controller,
tabs: [
new Tab(
......@@ -130,9 +141,10 @@ class _MainShopState extends State<MainShop>
))
],
),
),
new Container(
),
];
},
body: new Container(
height: double.maxFinite,
child: new TabBarView(
controller: _controller,
......@@ -242,11 +254,13 @@ class _MainShopState extends State<MainShop>
],
),
),
Container(
// color: Colors.blue,
height: double.maxFinite,
child: ShopServicePage(),
),
Expanded(
child: Container(
// color: Colors.blue,
// height: double.maxFinite,
child: ShopServicePage(),
),
),
],
),
// child: getlist(),
......@@ -268,8 +282,8 @@ class _MainShopState extends State<MainShop>
],
),
),
],
),
);
}
}
}
\ No newline at end of file
......@@ -418,7 +418,7 @@ class _ShopReviewsPageState extends State<ShopReviewsPage> {
color: Colors.black),
),
SizedBox(
width: SizeConfig.getWidth(60),
width: SizeConfig.getWidth(35),
),
Icon(Icons.more_vert),
],
......@@ -579,7 +579,7 @@ class _ShopReviewsPageState extends State<ShopReviewsPage> {
color: Colors.black),
),
SizedBox(
width: SizeConfig.getWidth(60),
width: SizeConfig.getWidth(35),
),
Icon(Icons.more_vert),
],
......
......@@ -17,8 +17,8 @@ class _ShopServicePageState extends State<ShopServicePage> {
@override
Widget build(BuildContext context) {
SizeConfig(context);
return Container(
child: ListView(
return Container(
child: ListView(
children: <Widget>[
Card1(),
Card2(),
......
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