Commit 0b203b907a7032f18ab69bda1a1f759aa0ea16b5

Authored by wdn127929
1 parent 1a5ee6b7

日订单UI

@@ -8,7 +8,8 @@ import 'package:one_key/widgets/v_empty_view.dart'; @@ -8,7 +8,8 @@ import 'package:one_key/widgets/v_empty_view.dart';
8 import '../../../../utils/screen_util.dart'; 8 import '../../../../utils/screen_util.dart';
9 9
10 class DayOrderLeftPage extends StatefulWidget { 10 class DayOrderLeftPage extends StatefulWidget {
11 - const DayOrderLeftPage({Key key}) : super(key: key); 11 + final int index;
  12 + const DayOrderLeftPage({Key key, this.index}) : super(key: key);
12 13
13 @override 14 @override
14 _DayOrderLeftPageState createState() => _DayOrderLeftPageState(); 15 _DayOrderLeftPageState createState() => _DayOrderLeftPageState();
@@ -51,9 +52,10 @@ class _DayOrderLeftPageState extends State<DayOrderLeftPage> { @@ -51,9 +52,10 @@ class _DayOrderLeftPageState extends State<DayOrderLeftPage> {
51 52
52 Widget _item(String city) { 53 Widget _item(String city) {
53 return ExpansionTile( 54 return ExpansionTile(
54 - // tilePadding: EdgeInsets.zero, 55 + tilePadding: EdgeInsets.symmetric(horizontal: w(10)),
  56 +
  57 + // childrenPadding: EdgeInsets.only(bottom: w(10)),
55 58
56 - // childrenPadding: EdgeInsets.zero,  
57 title: Text( 59 title: Text(
58 city, 60 city,
59 style: TextStyle(color: MyColours.color_515151, fontSize: font(16)), 61 style: TextStyle(color: MyColours.color_515151, fontSize: font(16)),
@@ -65,12 +67,12 @@ class _DayOrderLeftPageState extends State<DayOrderLeftPage> { @@ -65,12 +67,12 @@ class _DayOrderLeftPageState extends State<DayOrderLeftPage> {
65 width: w(12), 67 width: w(12),
66 ), 68 ),
67 69
68 - iconColor: Colors.red,  
69 - textColor: Colors.red,  
70 backgroundColor: MyColours.color_ffffff, 70 backgroundColor: MyColours.color_ffffff,
71 collapsedBackgroundColor: MyColours.color_ffffff, 71 collapsedBackgroundColor: MyColours.color_ffffff,
72 - collapsedIconColor: Colors.red,  
73 - collapsedTextColor: Colors.red, 72 + collapsedIconColor: MyColours.color_ffffff,
  73 + collapsedTextColor: MyColours.color_ffffff,
  74 + iconColor: MyColours.color_ffffff,
  75 + textColor: MyColours.color_ffffff,
74 76
75 onExpansionChanged: (value) { 77 onExpansionChanged: (value) {
76 print(value); 78 print(value);
@@ -92,7 +94,8 @@ class _DayOrderLeftPageState extends State<DayOrderLeftPage> { @@ -92,7 +94,8 @@ class _DayOrderLeftPageState extends State<DayOrderLeftPage> {
92 decoration: BoxDecoration( 94 decoration: BoxDecoration(
93 color: MyColours.color_f3f3f3, 95 color: MyColours.color_f3f3f3,
94 ), 96 ),
95 - padding: EdgeInsets.only(top: w(10), left: w(10), right: w(10)), 97 + padding:
  98 + EdgeInsets.only(top: w(5), bottom: w(5), left: w(10), right: w(10)),
96 child: Container( 99 child: Container(
97 // constraints: BoxConstraints(minHeight: w(10)), 100 // constraints: BoxConstraints(minHeight: w(10)),
98 // padding: EdgeInsets.only(top: w(10), left: w(10), right: w(10)), 101 // padding: EdgeInsets.only(top: w(10), left: w(10), right: w(10)),
@@ -177,76 +180,88 @@ class _DayOrderLeftPageState extends State<DayOrderLeftPage> { @@ -177,76 +180,88 @@ class _DayOrderLeftPageState extends State<DayOrderLeftPage> {
177 ], 180 ],
178 )), 181 )),
179 VEmptyView(10), 182 VEmptyView(10),
180 - Padding(  
181 - padding: EdgeInsets.symmetric(horizontal: w(10)),  
182 - child: Wrap(  
183 - runSpacing: w(6),  
184 - children: [  
185 - Text( 183 + widget.index == 1
  184 + ? Padding(
  185 + padding:
  186 + EdgeInsets.symmetric(horizontal: w(10)),
  187 + child: Text(
186 '6人', 188 '6人',
187 style: TextStyle( 189 style: TextStyle(
188 color: MyColours.color_999999, 190 color: MyColours.color_999999,
189 fontSize: font(10), 191 fontSize: font(10),
190 ), 192 ),
191 - ),  
192 - HEmptyView(10),  
193 - MyDivider(  
194 - w(1),  
195 - w(15),  
196 - color: MyColours.color_DBDBDB,  
197 - ),  
198 - HEmptyView(10),  
199 - Text(  
200 - '消费 25800.99元',  
201 - style: TextStyle(  
202 - color: MyColours.color_999999,  
203 - fontSize: font(10),  
204 - ),  
205 - ),  
206 - HEmptyView(10),  
207 - MyDivider(  
208 - w(1),  
209 - w(15),  
210 - color: MyColours.color_DBDBDB,  
211 - ),  
212 - HEmptyView(10),  
213 - Text(  
214 - '人均 103.2元',  
215 - style: TextStyle(  
216 - color: MyColours.color_999999,  
217 - fontSize: font(10),  
218 - ),  
219 - ),  
220 - HEmptyView(10),  
221 - MyDivider(  
222 - w(1),  
223 - w(15),  
224 - color: MyColours.color_DBDBDB,  
225 - ),  
226 - HEmptyView(10),  
227 - Text(  
228 - '存酒',  
229 - style: TextStyle(  
230 - color: MyColours.color_999999,  
231 - fontSize: font(10),  
232 - ),  
233 - ),  
234 - HEmptyView(10),  
235 - MyDivider(  
236 - w(1),  
237 - w(15),  
238 - color: MyColours.color_DBDBDB,  
239 - ),  
240 - HEmptyView(10),  
241 - Text(  
242 - '提前点餐',  
243 - style: TextStyle(  
244 - color: MyColours.color_999999,  
245 - fontSize: font(10),  
246 - ),  
247 - ),  
248 - ],  
249 - )), 193 + ))
  194 + : Padding(
  195 + padding:
  196 + EdgeInsets.symmetric(horizontal: w(10)),
  197 + child: Wrap(
  198 + runSpacing: w(6),
  199 + children: [
  200 + Text(
  201 + '6人',
  202 + style: TextStyle(
  203 + color: MyColours.color_999999,
  204 + fontSize: font(10),
  205 + ),
  206 + ),
  207 + HEmptyView(10),
  208 + MyDivider(
  209 + w(1),
  210 + w(15),
  211 + color: MyColours.color_DBDBDB,
  212 + ),
  213 + HEmptyView(10),
  214 + Text(
  215 + '消费 25800.99元',
  216 + style: TextStyle(
  217 + color: MyColours.color_999999,
  218 + fontSize: font(10),
  219 + ),
  220 + ),
  221 + HEmptyView(10),
  222 + MyDivider(
  223 + w(1),
  224 + w(15),
  225 + color: MyColours.color_DBDBDB,
  226 + ),
  227 + HEmptyView(10),
  228 + Text(
  229 + '人均 103.2元',
  230 + style: TextStyle(
  231 + color: MyColours.color_999999,
  232 + fontSize: font(10),
  233 + ),
  234 + ),
  235 + HEmptyView(10),
  236 + MyDivider(
  237 + w(1),
  238 + w(15),
  239 + color: MyColours.color_DBDBDB,
  240 + ),
  241 + HEmptyView(10),
  242 + Text(
  243 + '存酒',
  244 + style: TextStyle(
  245 + color: MyColours.color_999999,
  246 + fontSize: font(10),
  247 + ),
  248 + ),
  249 + HEmptyView(10),
  250 + MyDivider(
  251 + w(1),
  252 + w(15),
  253 + color: MyColours.color_DBDBDB,
  254 + ),
  255 + HEmptyView(10),
  256 + Text(
  257 + '提前点餐',
  258 + style: TextStyle(
  259 + color: MyColours.color_999999,
  260 + fontSize: font(10),
  261 + ),
  262 + ),
  263 + ],
  264 + )),
250 VEmptyView(10), 265 VEmptyView(10),
251 Padding( 266 Padding(
252 padding: EdgeInsets.symmetric(horizontal: w(10)), 267 padding: EdgeInsets.symmetric(horizontal: w(10)),
@@ -9,7 +9,6 @@ import '../../../../utils/screen_util.dart'; @@ -9,7 +9,6 @@ import '../../../../utils/screen_util.dart';
9 import '../../../../widgets/MyDivider.dart'; 9 import '../../../../widgets/MyDivider.dart';
10 import '../../../../widgets/h_empty_view.dart'; 10 import '../../../../widgets/h_empty_view.dart';
11 11
12 -  
13 /** 12 /**
14 * 13 *
15 * 日订单 14 * 日订单
@@ -306,6 +305,7 @@ class _DayOrderPageState extends State<DayOrderPage> @@ -306,6 +305,7 @@ class _DayOrderPageState extends State<DayOrderPage>
306 @override 305 @override
307 Widget build(BuildContext context) { 306 Widget build(BuildContext context) {
308 return Scaffold( 307 return Scaffold(
  308 + backgroundColor: MyColours.color_f3f3f3,
309 appBar: SystemAppBar('日订单'), 309 appBar: SystemAppBar('日订单'),
310 body: Column( 310 body: Column(
311 children: [ 311 children: [
@@ -362,13 +362,13 @@ class _DayOrderPageState extends State<DayOrderPage> @@ -362,13 +362,13 @@ class _DayOrderPageState extends State<DayOrderPage>
362 // right: ScreenUtil().setWidth(32)), 362 // right: ScreenUtil().setWidth(32)),
363 // indicatorWeight: ScreenUtil().setWidth(6.0), 363 // indicatorWeight: ScreenUtil().setWidth(6.0),
364 )), 364 )),
365 - VEmptyView(10),  
366 - 365 + // VEmptyView(10),
367 Expanded( 366 Expanded(
368 - child:  
369 - TabBarView(controller: tabController, children: [  
370 - DayOrderLeftPage(),  
371 - DayOrderLeftPage(), 367 + child: TabBarView(controller: tabController, children: [
  368 + DayOrderLeftPage(index: 0),
  369 + DayOrderLeftPage(
  370 + index: 1,
  371 + ),
372 ]), 372 ]),
373 ), 373 ),
374 ], 374 ],
@@ -630,13 +630,6 @@ packages: @@ -630,13 +630,6 @@ packages:
630 url: "https://pub.flutter-io.cn" 630 url: "https://pub.flutter-io.cn"
631 source: hosted 631 source: hosted
632 version: "2.1.0" 632 version: "2.1.0"
633 - grouped_list:  
634 - dependency: "direct main"  
635 - description:  
636 - name: grouped_list  
637 - url: "https://pub.flutter-io.cn"  
638 - source: hosted  
639 - version: "5.1.2"  
640 html: 633 html:
641 dependency: transitive 634 dependency: transitive
642 description: 635 description: