|
@@ -27,6 +27,7 @@ import 'package:one_key/models/table.dart' as t; |
|
@@ -27,6 +27,7 @@ import 'package:one_key/models/table.dart' as t; |
|
27
|
import 'package:url_launcher/url_launcher.dart';
|
27
|
import 'package:url_launcher/url_launcher.dart';
|
|
28
|
|
28
|
|
|
29
|
typedef CustomCallBack = void Function(Object object);
|
29
|
typedef CustomCallBack = void Function(Object object);
|
|
|
|
30
|
+typedef CustomCallBackMap = void Function(Map<String, String> object);
|
|
30
|
|
31
|
|
|
31
|
class DialogUtil {
|
32
|
class DialogUtil {
|
|
32
|
static Future openCreateAreaDialog(BuildContext context,
|
33
|
static Future openCreateAreaDialog(BuildContext context,
|
|
@@ -245,7 +246,7 @@ class DialogUtil { |
|
@@ -245,7 +246,7 @@ class DialogUtil { |
|
245
|
|
246
|
|
|
246
|
static Future openCreateTableDialog(BuildContext context, List<String> areas,
|
247
|
static Future openCreateTableDialog(BuildContext context, List<String> areas,
|
|
247
|
int currentAreaIndex, List<String> pnum,
|
248
|
int currentAreaIndex, List<String> pnum,
|
|
248
|
- {CustomCallBack onTap}) async {
|
249
|
+ {CustomCallBackMap onTap}) async {
|
|
249
|
TextEditingController controller = TextEditingController();
|
250
|
TextEditingController controller = TextEditingController();
|
|
250
|
FocusNode focusNode = FocusNode();
|
251
|
FocusNode focusNode = FocusNode();
|
|
251
|
bool showArea = true;
|
252
|
bool showArea = true;
|
|
@@ -253,7 +254,7 @@ class DialogUtil { |
|
@@ -253,7 +254,7 @@ class DialogUtil { |
|
253
|
bool showPnumMax = true;
|
254
|
bool showPnumMax = true;
|
|
254
|
String pnumMin = '';
|
255
|
String pnumMin = '';
|
|
255
|
String pnumMax = '';
|
256
|
String pnumMax = '';
|
|
256
|
- StateSetter globalState;
|
257
|
+ // StateSetter globalState;
|
|
257
|
// //输入框焦点
|
258
|
// //输入框焦点
|
|
258
|
// focusNode.addListener(() {
|
259
|
// focusNode.addListener(() {
|
|
259
|
// if (!focusNode.hasFocus) {
|
260
|
// if (!focusNode.hasFocus) {
|
|
@@ -274,310 +275,314 @@ class DialogUtil { |
|
@@ -274,310 +275,314 @@ class DialogUtil { |
|
274
|
barrierDismissible: false,
|
275
|
barrierDismissible: false,
|
|
275
|
builder: (BuildContext context) {
|
276
|
builder: (BuildContext context) {
|
|
276
|
return StatefulBuilder(builder: (context, state) {
|
277
|
return StatefulBuilder(builder: (context, state) {
|
|
277
|
- globalState = state;
|
278
|
+ // globalState = state;
|
|
278
|
return Center(
|
279
|
return Center(
|
|
279
|
- child: Container(
|
|
|
|
280
|
- padding:
|
|
|
|
281
|
- EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
282
|
- height: ScreenUtil().setWidth(326 * 2),
|
|
|
|
283
|
- decoration: BoxDecoration(
|
|
|
|
284
|
- borderRadius:
|
|
|
|
285
|
- BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
286
|
- child: Card(
|
|
|
|
287
|
- shape: RoundedRectangleBorder(
|
|
|
|
288
|
- borderRadius: BorderRadius.all(
|
|
|
|
289
|
- Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
290
|
- child: Stack(
|
|
|
|
291
|
- overflow: Overflow.visible,
|
|
|
|
292
|
- children: [
|
|
|
|
293
|
- Container(
|
|
|
|
294
|
- padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
|
|
|
|
295
|
- child: Column(
|
|
|
|
296
|
- children: [
|
|
|
|
297
|
- Container(
|
|
|
|
298
|
- // height: ScreenUtil().setWidth(48),
|
|
|
|
299
|
- alignment: Alignment.center,
|
|
|
|
300
|
- child: Text('新建桌位',
|
|
|
|
301
|
- style: TextStyle(
|
|
|
|
302
|
- fontWeight: FontWeight.bold,
|
|
|
|
303
|
- fontSize: ScreenUtil().setSp(34),
|
|
|
|
304
|
- color: MyColours.color_333333)),
|
|
|
|
305
|
- ),
|
|
|
|
306
|
- VEmptyView(60),
|
|
|
|
307
|
- Container(
|
|
|
|
308
|
- height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
309
|
- child: Row(
|
|
|
|
310
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
311
|
- children: [
|
|
|
|
312
|
- Text(
|
|
|
|
313
|
- '*',
|
|
|
|
314
|
- style: TextStyle(
|
|
|
|
315
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
316
|
- color: MyColours.color_E95750),
|
|
|
|
317
|
- ),
|
|
|
|
318
|
- Text(
|
|
|
|
319
|
- '选择区域',
|
|
|
|
320
|
- style: TextStyle(
|
|
|
|
321
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
322
|
- color: MyColours.color_333333),
|
|
|
|
323
|
- ),
|
|
|
|
324
|
- HEmptyView(40),
|
|
|
|
325
|
- // Stack(
|
|
|
|
326
|
- // overflow: Overflow.visible,
|
|
|
|
327
|
- // children: [
|
|
|
|
328
|
- btnChoose(areas[currentAreaIndex],
|
|
|
|
329
|
- ScreenUtil().setWidth(120 * 2), (value) {
|
|
|
|
330
|
- state(() {
|
|
|
|
331
|
- showPnumMin = true;
|
|
|
|
332
|
- showPnumMax = true;
|
|
|
|
333
|
- showArea = !showArea;
|
|
|
|
334
|
- });
|
|
|
|
335
|
- }),
|
|
|
|
336
|
- ],
|
|
|
|
337
|
- ),
|
|
|
|
338
|
- ),
|
|
|
|
339
|
- VEmptyView(60),
|
|
|
|
340
|
- Container(
|
|
|
|
341
|
- height: ScreenUtil().setWidth(28 * 2),
|
|
|
|
342
|
- child: Row(
|
|
|
|
343
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
280
|
+ child: Container(
|
|
|
|
281
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
282
|
+ horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
283
|
+ height: ScreenUtil().setWidth(326 * 2) +
|
|
|
|
284
|
+ ScreenUtil().setWidth(45 * 2),
|
|
|
|
285
|
+ decoration: BoxDecoration(
|
|
|
|
286
|
+ borderRadius:
|
|
|
|
287
|
+ BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
288
|
+ child: Stack(children: [
|
|
|
|
289
|
+ Column(
|
|
|
|
290
|
+ children: [
|
|
|
|
291
|
+ Card(
|
|
|
|
292
|
+ shape: RoundedRectangleBorder(
|
|
|
|
293
|
+ borderRadius: BorderRadius.all(
|
|
|
|
294
|
+ Radius.circular(
|
|
|
|
295
|
+ ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
296
|
+ child: Stack(
|
|
|
|
297
|
+ overflow: Overflow.visible,
|
|
344
|
children: [
|
298
|
children: [
|
|
345
|
- Text(
|
|
|
|
346
|
- '*',
|
|
|
|
347
|
- style: TextStyle(
|
|
|
|
348
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
349
|
- color: MyColours.color_E95750),
|
|
|
|
350
|
- ),
|
|
|
|
351
|
- Text(
|
|
|
|
352
|
- '桌位名称',
|
|
|
|
353
|
- style: TextStyle(
|
|
|
|
354
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
355
|
- color: MyColours.color_333333),
|
|
|
|
356
|
- ),
|
|
|
|
357
|
- HEmptyView(40),
|
|
|
|
358
|
- Expanded(
|
|
|
|
359
|
- child: TextField(
|
|
|
|
360
|
- controller: controller,
|
|
|
|
361
|
- maxLines: 1,
|
|
|
|
362
|
- focusNode: focusNode,
|
|
|
|
363
|
- // //光标颜色
|
|
|
|
364
|
- // cursorColor:
|
|
|
|
365
|
- // widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
366
|
- //输入文本的样式
|
|
|
|
367
|
- style: TextStyle(
|
|
|
|
368
|
- fontSize: ScreenUtil().setSp(30),
|
|
|
|
369
|
- color: MyColours.color_333333),
|
|
|
|
370
|
-
|
|
|
|
371
|
- decoration: InputDecoration(
|
|
|
|
372
|
- contentPadding: EdgeInsets.only(
|
|
|
|
373
|
- bottom: ScreenUtil()
|
|
|
|
374
|
- .setWidth(40)), //设置文字内容与边框距离
|
|
|
|
375
|
- enabledBorder: UnderlineInputBorder(
|
|
|
|
376
|
- borderSide: BorderSide(
|
|
|
|
377
|
- color: MyColours.color_efefef),
|
299
|
+ Container(
|
|
|
|
300
|
+ padding: EdgeInsets.all(
|
|
|
|
301
|
+ ScreenUtil().setWidth(40)),
|
|
|
|
302
|
+ child: Column(
|
|
|
|
303
|
+ children: [
|
|
|
|
304
|
+ Container(
|
|
|
|
305
|
+ // height: ScreenUtil().setWidth(48),
|
|
|
|
306
|
+ alignment: Alignment.center,
|
|
|
|
307
|
+ child: Text('新建桌位',
|
|
|
|
308
|
+ style: TextStyle(
|
|
|
|
309
|
+ fontWeight: FontWeight.bold,
|
|
|
|
310
|
+ fontSize:
|
|
|
|
311
|
+ ScreenUtil().setSp(34),
|
|
|
|
312
|
+ color:
|
|
|
|
313
|
+ MyColours.color_333333)),
|
|
378
|
),
|
314
|
),
|
|
379
|
- focusedBorder: UnderlineInputBorder(
|
|
|
|
380
|
- borderSide: BorderSide(
|
|
|
|
381
|
- color: MyColours.color_efefef,
|
|
|
|
382
|
- width: ScreenUtil().setWidth(2)),
|
315
|
+ VEmptyView(60),
|
|
|
|
316
|
+ Container(
|
|
|
|
317
|
+ height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
318
|
+ child: Row(
|
|
|
|
319
|
+ crossAxisAlignment:
|
|
|
|
320
|
+ CrossAxisAlignment.center,
|
|
|
|
321
|
+ children: [
|
|
|
|
322
|
+ Text(
|
|
|
|
323
|
+ '*',
|
|
|
|
324
|
+ style: TextStyle(
|
|
|
|
325
|
+ fontSize:
|
|
|
|
326
|
+ ScreenUtil().setSp(32),
|
|
|
|
327
|
+ color:
|
|
|
|
328
|
+ MyColours.color_E95750),
|
|
|
|
329
|
+ ),
|
|
|
|
330
|
+ Text(
|
|
|
|
331
|
+ '选择区域',
|
|
|
|
332
|
+ style: TextStyle(
|
|
|
|
333
|
+ fontSize:
|
|
|
|
334
|
+ ScreenUtil().setSp(32),
|
|
|
|
335
|
+ color:
|
|
|
|
336
|
+ MyColours.color_333333),
|
|
|
|
337
|
+ ),
|
|
|
|
338
|
+ HEmptyView(40),
|
|
|
|
339
|
+ // Stack(
|
|
|
|
340
|
+ // overflow: Overflow.visible,
|
|
|
|
341
|
+ // children: [
|
|
|
|
342
|
+ btnChoose(
|
|
|
|
343
|
+ areas[currentAreaIndex],
|
|
|
|
344
|
+ ScreenUtil()
|
|
|
|
345
|
+ .setWidth(120 * 2),
|
|
|
|
346
|
+ (value) {
|
|
|
|
347
|
+ state(() {
|
|
|
|
348
|
+ showPnumMin = true;
|
|
|
|
349
|
+ showPnumMax = true;
|
|
|
|
350
|
+ showArea = !showArea;
|
|
|
|
351
|
+ });
|
|
|
|
352
|
+ }),
|
|
|
|
353
|
+ ],
|
|
|
|
354
|
+ ),
|
|
383
|
),
|
355
|
),
|
|
384
|
- hintText: '请输入桌位名称',
|
|
|
|
385
|
- hintStyle: TextStyle(
|
|
|
|
386
|
- color: MyColours.color_999999,
|
|
|
|
387
|
- fontSize: ScreenUtil().setSp(30),
|
356
|
+ VEmptyView(60),
|
|
|
|
357
|
+ Container(
|
|
|
|
358
|
+ height: ScreenUtil().setWidth(28 * 2),
|
|
|
|
359
|
+ child: Row(
|
|
|
|
360
|
+ crossAxisAlignment:
|
|
|
|
361
|
+ CrossAxisAlignment.start,
|
|
|
|
362
|
+ children: [
|
|
|
|
363
|
+ Text(
|
|
|
|
364
|
+ '*',
|
|
|
|
365
|
+ style: TextStyle(
|
|
|
|
366
|
+ fontSize:
|
|
|
|
367
|
+ ScreenUtil().setSp(32),
|
|
|
|
368
|
+ color:
|
|
|
|
369
|
+ MyColours.color_E95750),
|
|
|
|
370
|
+ ),
|
|
|
|
371
|
+ Text(
|
|
|
|
372
|
+ '桌位名称',
|
|
|
|
373
|
+ style: TextStyle(
|
|
|
|
374
|
+ fontSize:
|
|
|
|
375
|
+ ScreenUtil().setSp(32),
|
|
|
|
376
|
+ color:
|
|
|
|
377
|
+ MyColours.color_333333),
|
|
|
|
378
|
+ ),
|
|
|
|
379
|
+ HEmptyView(40),
|
|
|
|
380
|
+ Expanded(
|
|
|
|
381
|
+ child: TextField(
|
|
|
|
382
|
+ controller: controller,
|
|
|
|
383
|
+ maxLines: 1,
|
|
|
|
384
|
+ focusNode: focusNode,
|
|
|
|
385
|
+ // //光标颜色
|
|
|
|
386
|
+ // cursorColor:
|
|
|
|
387
|
+ // widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
388
|
+ //输入文本的样式
|
|
|
|
389
|
+ style: TextStyle(
|
|
|
|
390
|
+ fontSize: ScreenUtil()
|
|
|
|
391
|
+ .setSp(30),
|
|
|
|
392
|
+ color: MyColours
|
|
|
|
393
|
+ .color_333333),
|
|
|
|
394
|
+
|
|
|
|
395
|
+ decoration: InputDecoration(
|
|
|
|
396
|
+ contentPadding: EdgeInsets.only(
|
|
|
|
397
|
+ bottom: ScreenUtil()
|
|
|
|
398
|
+ .setWidth(
|
|
|
|
399
|
+ 40)), //设置文字内容与边框距离
|
|
|
|
400
|
+ enabledBorder:
|
|
|
|
401
|
+ UnderlineInputBorder(
|
|
|
|
402
|
+ borderSide: BorderSide(
|
|
|
|
403
|
+ color: MyColours
|
|
|
|
404
|
+ .color_efefef),
|
|
|
|
405
|
+ ),
|
|
|
|
406
|
+ focusedBorder:
|
|
|
|
407
|
+ UnderlineInputBorder(
|
|
|
|
408
|
+ borderSide: BorderSide(
|
|
|
|
409
|
+ color: MyColours
|
|
|
|
410
|
+ .color_efefef,
|
|
|
|
411
|
+ width: ScreenUtil()
|
|
|
|
412
|
+ .setWidth(2)),
|
|
|
|
413
|
+ ),
|
|
|
|
414
|
+ hintText: '请输入桌位名称',
|
|
|
|
415
|
+ hintStyle: TextStyle(
|
|
|
|
416
|
+ color: MyColours
|
|
|
|
417
|
+ .color_999999,
|
|
|
|
418
|
+ fontSize: ScreenUtil()
|
|
|
|
419
|
+ .setSp(30),
|
|
|
|
420
|
+ ),
|
|
|
|
421
|
+ ),
|
|
|
|
422
|
+ onChanged: (value) {},
|
|
|
|
423
|
+ onEditingComplete: () {
|
|
|
|
424
|
+ FocusScope.of(context)
|
|
|
|
425
|
+ .requestFocus(
|
|
|
|
426
|
+ FocusNode()); //点击空白处隐藏键盘
|
|
|
|
427
|
+ },
|
|
|
|
428
|
+ keyboardType:
|
|
|
|
429
|
+ TextInputType.text,
|
|
|
|
430
|
+ ),
|
|
|
|
431
|
+ )
|
|
|
|
432
|
+ ],
|
|
|
|
433
|
+ ),
|
|
388
|
),
|
434
|
),
|
|
389
|
- ),
|
|
|
|
390
|
- onChanged: (value) {},
|
|
|
|
391
|
- onEditingComplete: () {
|
|
|
|
392
|
- FocusScope.of(context).requestFocus(
|
|
|
|
393
|
- FocusNode()); //点击空白处隐藏键盘
|
|
|
|
394
|
- },
|
|
|
|
395
|
- keyboardType: TextInputType.text,
|
435
|
+ VEmptyView(60),
|
|
|
|
436
|
+ Container(
|
|
|
|
437
|
+ height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
438
|
+ child: Row(
|
|
|
|
439
|
+ crossAxisAlignment:
|
|
|
|
440
|
+ CrossAxisAlignment.center,
|
|
|
|
441
|
+ children: [
|
|
|
|
442
|
+ Text(
|
|
|
|
443
|
+ '人数(选填)',
|
|
|
|
444
|
+ style: TextStyle(
|
|
|
|
445
|
+ fontSize:
|
|
|
|
446
|
+ ScreenUtil().setSp(32),
|
|
|
|
447
|
+ color:
|
|
|
|
448
|
+ MyColours.color_333333),
|
|
|
|
449
|
+ ),
|
|
|
|
450
|
+ HEmptyView(40),
|
|
|
|
451
|
+ // Stack(
|
|
|
|
452
|
+ // overflow: Overflow.visible,
|
|
|
|
453
|
+ // children: [
|
|
|
|
454
|
+ btnChoose(pnumMin,
|
|
|
|
455
|
+ ScreenUtil().setWidth(54 * 2),
|
|
|
|
456
|
+ (value) {
|
|
|
|
457
|
+ state(() {
|
|
|
|
458
|
+ showArea = true;
|
|
|
|
459
|
+ showPnumMax = true;
|
|
|
|
460
|
+ showPnumMin = !showPnumMin;
|
|
|
|
461
|
+ });
|
|
|
|
462
|
+ }),
|
|
|
|
463
|
+ HEmptyView(20),
|
|
|
|
464
|
+ Text(
|
|
|
|
465
|
+ '至',
|
|
|
|
466
|
+ style: TextStyle(
|
|
|
|
467
|
+ fontSize:
|
|
|
|
468
|
+ ScreenUtil().setSp(30),
|
|
|
|
469
|
+ color:
|
|
|
|
470
|
+ MyColours.color_199095),
|
|
|
|
471
|
+ ),
|
|
|
|
472
|
+ HEmptyView(20),
|
|
|
|
473
|
+ btnChoose(pnumMax,
|
|
|
|
474
|
+ ScreenUtil().setWidth(54 * 2),
|
|
|
|
475
|
+ (value) {
|
|
|
|
476
|
+ state(() {
|
|
|
|
477
|
+ showArea = true;
|
|
|
|
478
|
+ showPnumMin = true;
|
|
|
|
479
|
+ showPnumMax = !showPnumMax;
|
|
|
|
480
|
+ });
|
|
|
|
481
|
+ }),
|
|
|
|
482
|
+ ],
|
|
|
|
483
|
+ ),
|
|
|
|
484
|
+ ),
|
|
|
|
485
|
+ VEmptyView(80),
|
|
|
|
486
|
+ RoundButton(
|
|
|
|
487
|
+ text: '保存',
|
|
|
|
488
|
+ width: ScreenUtil().setWidth(300),
|
|
|
|
489
|
+ height: ScreenUtil().setWidth(80),
|
|
|
|
490
|
+ radius: ScreenUtil().setWidth(10),
|
|
|
|
491
|
+ fontSize: 34,
|
|
|
|
492
|
+ onPressed: () {
|
|
|
|
493
|
+ if (controller.text.trim() ==
|
|
|
|
494
|
+ '') {
|
|
|
|
495
|
+ Utils.showToast('请输入桌位名称!');
|
|
|
|
496
|
+ return;
|
|
|
|
497
|
+ }
|
|
|
|
498
|
+ // 当前选中区域
|
|
|
|
499
|
+ // areas[currentAreaIndex]
|
|
|
|
500
|
+ //最低人数
|
|
|
|
501
|
+ // pnumMin
|
|
|
|
502
|
+ //最高人数
|
|
|
|
503
|
+ // pnumMax
|
|
|
|
504
|
+
|
|
|
|
505
|
+ onTap({
|
|
|
|
506
|
+ 'areaname':
|
|
|
|
507
|
+ areas[currentAreaIndex],
|
|
|
|
508
|
+ 'name': controller.text,
|
|
|
|
509
|
+ 'pnumMin': pnumMin,
|
|
|
|
510
|
+ 'pnumMax': pnumMax
|
|
|
|
511
|
+ });
|
|
|
|
512
|
+ Navigator.pop(context);
|
|
|
|
513
|
+ })
|
|
|
|
514
|
+ ],
|
|
396
|
),
|
515
|
),
|
|
397
|
- )
|
|
|
|
398
|
- ],
|
|
|
|
399
|
- ),
|
|
|
|
400
|
- ),
|
|
|
|
401
|
- VEmptyView(60),
|
|
|
|
402
|
- Container(
|
|
|
|
403
|
- height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
404
|
- child: Row(
|
|
|
|
405
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
406
|
- children: [
|
|
|
|
407
|
- Text(
|
|
|
|
408
|
- '*',
|
|
|
|
409
|
- style: TextStyle(
|
|
|
|
410
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
411
|
- color: MyColours.color_E95750),
|
|
|
|
412
|
- ),
|
|
|
|
413
|
- Text(
|
|
|
|
414
|
- '人数(选填)',
|
|
|
|
415
|
- style: TextStyle(
|
|
|
|
416
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
417
|
- color: MyColours.color_333333),
|
|
|
|
418
|
- ),
|
|
|
|
419
|
- HEmptyView(40),
|
|
|
|
420
|
- // Stack(
|
|
|
|
421
|
- // overflow: Overflow.visible,
|
|
|
|
422
|
- // children: [
|
|
|
|
423
|
- btnChoose(
|
|
|
|
424
|
- pnumMin, ScreenUtil().setWidth(52 * 2),
|
|
|
|
425
|
- (value) {
|
|
|
|
426
|
- state(() {
|
|
|
|
427
|
- showArea = true;
|
|
|
|
428
|
- showPnumMax = true;
|
|
|
|
429
|
- showPnumMin = !showPnumMin;
|
|
|
|
430
|
- });
|
|
|
|
431
|
- }),
|
|
|
|
432
|
- HEmptyView(20),
|
|
|
|
433
|
- Text(
|
|
|
|
434
|
- '至',
|
|
|
|
435
|
- style: TextStyle(
|
|
|
|
436
|
- fontSize: ScreenUtil().setSp(30),
|
|
|
|
437
|
- color: MyColours.color_199095),
|
|
|
|
438
|
),
|
516
|
),
|
|
439
|
- HEmptyView(20),
|
|
|
|
440
|
- btnChoose(
|
|
|
|
441
|
- pnumMax, ScreenUtil().setWidth(52 * 2),
|
|
|
|
442
|
- (value) {
|
|
|
|
443
|
- state(() {
|
|
|
|
444
|
- showArea = true;
|
|
|
|
445
|
- showPnumMin = true;
|
|
|
|
446
|
- showPnumMax = !showPnumMax;
|
|
|
|
447
|
- });
|
|
|
|
448
|
- }),
|
517
|
+ Positioned(
|
|
|
|
518
|
+ left: ScreenUtil().setWidth(113 * 2),
|
|
|
|
519
|
+ top: ScreenUtil().setWidth(105 * 2),
|
|
|
|
520
|
+ child: Offstage(
|
|
|
|
521
|
+ offstage: showArea,
|
|
|
|
522
|
+ child: selectWidget(areas, (index) {
|
|
|
|
523
|
+ state(() {
|
|
|
|
524
|
+ showArea = !showArea;
|
|
|
|
525
|
+ currentAreaIndex = index;
|
|
|
|
526
|
+ });
|
|
|
|
527
|
+ }),
|
|
|
|
528
|
+ )),
|
|
|
|
529
|
+ Positioned(
|
|
|
|
530
|
+ top: 0,
|
|
|
|
531
|
+ right: 0,
|
|
|
|
532
|
+ child: InkWell(
|
|
|
|
533
|
+ onTap: () {
|
|
|
|
534
|
+ Navigator.pop(context);
|
|
|
|
535
|
+ },
|
|
|
|
536
|
+ child: Container(
|
|
|
|
537
|
+ padding: EdgeInsets.only(
|
|
|
|
538
|
+ top: ScreenUtil().setWidth(30),
|
|
|
|
539
|
+ right: ScreenUtil().setWidth(40),
|
|
|
|
540
|
+ left: ScreenUtil().setWidth(40),
|
|
|
|
541
|
+ bottom: ScreenUtil().setWidth(40),
|
|
|
|
542
|
+ ),
|
|
|
|
543
|
+ child: Image.asset(
|
|
|
|
544
|
+ Utils.getImgPath('close'),
|
|
|
|
545
|
+ width: ScreenUtil().setWidth(28),
|
|
|
|
546
|
+ height: ScreenUtil().setWidth(28),
|
|
|
|
547
|
+ ),
|
|
|
|
548
|
+ )),
|
|
|
|
549
|
+ )
|
|
449
|
],
|
550
|
],
|
|
450
|
- ),
|
|
|
|
451
|
- ),
|
|
|
|
452
|
- VEmptyView(80),
|
|
|
|
453
|
- RoundButton(
|
|
|
|
454
|
- text: '保存',
|
|
|
|
455
|
- width: ScreenUtil().setWidth(300),
|
|
|
|
456
|
- height: ScreenUtil().setWidth(80),
|
|
|
|
457
|
- radius: ScreenUtil().setWidth(10),
|
|
|
|
458
|
- fontSize: 34,
|
|
|
|
459
|
- onPressed: () {
|
|
|
|
460
|
- if (controller.text.trim() == '') {
|
|
|
|
461
|
- Utils.showToast('请输入桌位名称!');
|
|
|
|
462
|
- return;
|
|
|
|
463
|
- }
|
|
|
|
464
|
- // 当前选中区域
|
|
|
|
465
|
- // areas[currentAreaIndex]
|
|
|
|
466
|
- //最低人数
|
|
|
|
467
|
- // pnumMin
|
|
|
|
468
|
- //最高人数
|
|
|
|
469
|
- // pnumMax
|
|
|
|
470
|
-
|
|
|
|
471
|
- onTap(controller.text);
|
|
|
|
472
|
- Navigator.pop(context, controller.text);
|
|
|
|
473
|
- })
|
|
|
|
474
|
- ],
|
|
|
|
475
|
- ),
|
551
|
+ )),
|
|
|
|
552
|
+ Container(
|
|
|
|
553
|
+ height: ScreenUtil().setWidth(45 * 2),
|
|
|
|
554
|
+ color: Colors.transparent)
|
|
|
|
555
|
+ ],
|
|
476
|
),
|
556
|
),
|
|
477
|
Positioned(
|
557
|
Positioned(
|
|
478
|
- left: ScreenUtil().setWidth(113 * 2),
|
|
|
|
479
|
- top: ScreenUtil().setWidth(105 * 2),
|
|
|
|
480
|
- child: Offstage(
|
|
|
|
481
|
- offstage: showArea,
|
|
|
|
482
|
- child: selectWidget(areas, (index) {
|
|
|
|
483
|
- state(() {
|
|
|
|
484
|
- showArea = !showArea;
|
|
|
|
485
|
- currentAreaIndex = index;
|
|
|
|
486
|
- });
|
|
|
|
487
|
- }),
|
|
|
|
488
|
- // child: Container(
|
|
|
|
489
|
- // decoration: BoxDecoration(
|
|
|
|
490
|
- // color: MyColours.color_ffffff,
|
|
|
|
491
|
- // borderRadius: BorderRadius.circular(
|
|
|
|
492
|
- // ScreenUtil().setWidth(10)),
|
|
|
|
493
|
- // border: Border.all(
|
|
|
|
494
|
- // color: MyColours.color_cccccc,
|
|
|
|
495
|
- // width: ScreenUtil().setWidth(2))),
|
|
|
|
496
|
- // width: ScreenUtil().setWidth(120 * 2),
|
|
|
|
497
|
- // height: ScreenUtil().setWidth(140 * 2),
|
|
|
|
498
|
- // child: ListView.builder(
|
|
|
|
499
|
- // padding: EdgeInsets.symmetric(
|
|
|
|
500
|
- // horizontal:
|
|
|
|
501
|
- // ScreenUtil().setWidth(20)),
|
|
|
|
502
|
- // itemCount: areas.length,
|
|
|
|
503
|
- // itemBuilder: (context, index) {
|
|
|
|
504
|
- // return InkWell(
|
|
|
|
505
|
- // onTap: () {
|
|
|
|
506
|
- // state(() {
|
|
|
|
507
|
- // showArea = !showArea;
|
|
|
|
508
|
- // currentAreaIndex = index;
|
|
|
|
509
|
- // });
|
|
|
|
510
|
- // },
|
|
|
|
511
|
- // child: Container(
|
|
|
|
512
|
- // padding: EdgeInsets.all(
|
|
|
|
513
|
- // ScreenUtil().setWidth(20)),
|
|
|
|
514
|
- // decoration: BoxDecoration(
|
|
|
|
515
|
- // border: Border(
|
|
|
|
516
|
- // bottom: BorderSide(
|
|
|
|
517
|
- // color: MyColours
|
|
|
|
518
|
- // .color_efefef,
|
|
|
|
519
|
- // width: ScreenUtil()
|
|
|
|
520
|
- // .setWidth(2)))),
|
|
|
|
521
|
- // child: Text(areas[index],
|
|
|
|
522
|
- // style: TextStyle(
|
|
|
|
523
|
- // color:
|
|
|
|
524
|
- // MyColours.color_199095,
|
|
|
|
525
|
- // fontSize: ScreenUtil()
|
|
|
|
526
|
- // .setSp(28))),
|
|
|
|
527
|
- // ),
|
|
|
|
528
|
- // );
|
|
|
|
529
|
- // }))
|
|
|
|
530
|
- )),
|
|
|
|
531
|
- Positioned(
|
|
|
|
532
|
left: ScreenUtil().setWidth(136 * 2),
|
558
|
left: ScreenUtil().setWidth(136 * 2),
|
|
533
|
top: ScreenUtil().setWidth(221 * 2),
|
559
|
top: ScreenUtil().setWidth(221 * 2),
|
|
534
|
child: Offstage(
|
560
|
child: Offstage(
|
|
535
|
- offstage: showPnumMin,
|
|
|
|
536
|
- child: selectWidget(pnum, (index) {
|
|
|
|
537
|
- state(() {
|
|
|
|
538
|
- showPnumMin = !showPnumMin;
|
|
|
|
539
|
- pnumMin = pnum[index];
|
|
|
|
540
|
- });
|
|
|
|
541
|
- }),
|
|
|
|
542
|
- )),
|
561
|
+ offstage: showPnumMin,
|
|
|
|
562
|
+ child: Material(
|
|
|
|
563
|
+ color: Colors.transparent,
|
|
|
|
564
|
+ child: selectWidget(pnum, (index) {
|
|
|
|
565
|
+ state(() {
|
|
|
|
566
|
+ showPnumMin = !showPnumMin;
|
|
|
|
567
|
+ pnumMin = pnum[index];
|
|
|
|
568
|
+ });
|
|
|
|
569
|
+ }),
|
|
|
|
570
|
+ ))),
|
|
543
|
Positioned(
|
571
|
Positioned(
|
|
544
|
left: ScreenUtil().setWidth(223 * 2),
|
572
|
left: ScreenUtil().setWidth(223 * 2),
|
|
545
|
top: ScreenUtil().setWidth(221 * 2),
|
573
|
top: ScreenUtil().setWidth(221 * 2),
|
|
546
|
- child: Offstage(
|
|
|
|
547
|
- offstage: showPnumMax,
|
|
|
|
548
|
- child: selectWidget(pnum, (index) {
|
|
|
|
549
|
- state(() {
|
|
|
|
550
|
- showPnumMax = !showPnumMax;
|
|
|
|
551
|
- pnumMax = pnum[index];
|
|
|
|
552
|
- });
|
|
|
|
553
|
- }),
|
|
|
|
554
|
- )),
|
|
|
|
555
|
- Positioned(
|
|
|
|
556
|
- top: 0,
|
|
|
|
557
|
- right: 0,
|
|
|
|
558
|
- child: InkWell(
|
|
|
|
559
|
- onTap: () {
|
|
|
|
560
|
- Navigator.pop(context);
|
|
|
|
561
|
- },
|
|
|
|
562
|
- child: Container(
|
|
|
|
563
|
- padding: EdgeInsets.only(
|
|
|
|
564
|
- top: ScreenUtil().setWidth(30),
|
|
|
|
565
|
- right: ScreenUtil().setWidth(40),
|
|
|
|
566
|
- left: ScreenUtil().setWidth(40),
|
|
|
|
567
|
- bottom: ScreenUtil().setWidth(40),
|
|
|
|
568
|
- ),
|
|
|
|
569
|
- child: Image.asset(
|
|
|
|
570
|
- Utils.getImgPath('close'),
|
|
|
|
571
|
- width: ScreenUtil().setWidth(28),
|
|
|
|
572
|
- height: ScreenUtil().setWidth(28),
|
|
|
|
573
|
- ),
|
|
|
|
574
|
- )),
|
|
|
|
575
|
- )
|
|
|
|
576
|
- ],
|
|
|
|
577
|
- ),
|
|
|
|
578
|
- ),
|
|
|
|
579
|
- ),
|
|
|
|
580
|
- );
|
574
|
+ child: Material(
|
|
|
|
575
|
+ color: Colors.transparent,
|
|
|
|
576
|
+ child: Offstage(
|
|
|
|
577
|
+ offstage: showPnumMax,
|
|
|
|
578
|
+ child: selectWidget(pnum, (index) {
|
|
|
|
579
|
+ state(() {
|
|
|
|
580
|
+ showPnumMax = !showPnumMax;
|
|
|
|
581
|
+ pnumMax = pnum[index];
|
|
|
|
582
|
+ });
|
|
|
|
583
|
+ }),
|
|
|
|
584
|
+ ))),
|
|
|
|
585
|
+ ])));
|
|
581
|
});
|
586
|
});
|
|
582
|
});
|
587
|
});
|
|
583
|
}
|
588
|
}
|