Commit cb6f643a2a7bbe271a6e7142feb4f2bf6164466e

Authored by wdn127929
1 parent cd210db2

修复之前UI bug

@@ -60,8 +60,6 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -60,8 +60,6 @@ class TableManagerPageState extends State<TableManagerPage> {
60 final ItemPositionsListener itemPositionsListener = 60 final ItemPositionsListener itemPositionsListener =
61 ItemPositionsListener.create(); 61 ItemPositionsListener.create();
62 62
63 -  
64 -  
65 @override 63 @override
66 void initState() { 64 void initState() {
67 // TODO: implement initState 65 // TODO: implement initState
@@ -74,7 +72,6 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -74,7 +72,6 @@ class TableManagerPageState extends State<TableManagerPage> {
74 72
75 // personNumList.add('30以上'); 73 // personNumList.add('30以上');
76 74
77 -  
78 WidgetsBinding.instance.addPostFrameCallback((_) { 75 WidgetsBinding.instance.addPostFrameCallback((_) {
79 tableManagerModel.initTime(context); 76 tableManagerModel.initTime(context);
80 EventBus().on("refresh_tablemanager", (arg) { 77 EventBus().on("refresh_tablemanager", (arg) {
@@ -355,12 +352,13 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -355,12 +352,13 @@ class TableManagerPageState extends State<TableManagerPage> {
355 return Expanded( 352 return Expanded(
356 flex: 1, 353 flex: 1,
357 child: Container( 354 child: Container(
358 - // constraints: BoxConstraints(maxHeight: ScreenUtil().setWidth(300)), 355 + // constraints: BoxConstraints(minHeight: ScreenUtil().setWidth(600)),
359 // height: ScreenUtil().setWidth(400), 356 // height: ScreenUtil().setWidth(400),
360 width: double.infinity, 357 width: double.infinity,
361 - padding: EdgeInsets.symmetric(  
362 - horizontal: ScreenUtil().setWidth(40),  
363 - vertical: ScreenUtil().setWidth(30)), 358 + padding: EdgeInsets.only(
  359 + left: ScreenUtil().setWidth(40),
  360 + right: ScreenUtil().setWidth(40),
  361 + top: ScreenUtil().setWidth(30)),
364 decoration: BoxDecoration( 362 decoration: BoxDecoration(
365 color: MyColours.color_ffffff, 363 color: MyColours.color_ffffff,
366 boxShadow: [ 364 boxShadow: [
@@ -384,14 +382,14 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -384,14 +382,14 @@ class TableManagerPageState extends State<TableManagerPage> {
384 color: MyColours.color_333333, 382 color: MyColours.color_333333,
385 fontSize: ScreenUtil().setSp(28)), 383 fontSize: ScreenUtil().setSp(28)),
386 ), 384 ),
387 - VEmptyView(20), 385 + VEmptyView(15),
388 Text( 386 Text(
389 '已选桌位:', 387 '已选桌位:',
390 style: TextStyle( 388 style: TextStyle(
391 color: MyColours.color_333333, 389 color: MyColours.color_333333,
392 fontSize: ScreenUtil().setSp(26)), 390 fontSize: ScreenUtil().setSp(26)),
393 ), 391 ),
394 - VEmptyView(20), 392 + VEmptyView(15),
395 Expanded( 393 Expanded(
396 child: Container( 394 child: Container(
397 width: ScreenUtil.screenWidthDp - 395 width: ScreenUtil.screenWidthDp -
@@ -429,6 +427,9 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -429,6 +427,9 @@ class TableManagerPageState extends State<TableManagerPage> {
429 Container( 427 Container(
430 // width: ScreenUtil().setWidth(100), 428 // width: ScreenUtil().setWidth(100),
431 // color: Colors.red, 429 // color: Colors.red,
  430 + constraints: BoxConstraints(
  431 + minHeight: ScreenUtil().setWidth(500),
  432 + ),
432 child: Column( 433 child: Column(
433 children: [ 434 children: [
434 RoundButton( 435 RoundButton(
@@ -553,9 +554,10 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -553,9 +554,10 @@ class TableManagerPageState extends State<TableManagerPage> {
553 tableManagerModel.notifyListeners(); 554 tableManagerModel.notifyListeners();
554 }, 555 },
555 child: Padding( 556 child: Padding(
556 - padding: EdgeInsets.symmetric(  
557 - horizontal: ScreenUtil().setWidth(40),  
558 - vertical: ScreenUtil().setWidth(30)), 557 + padding: EdgeInsets.only(
  558 + left: ScreenUtil().setWidth(30),
  559 + right: ScreenUtil().setWidth(30),
  560 + top: ScreenUtil().setWidth(15)),
559 child: Text( 561 child: Text(
560 '取消重置', 562 '取消重置',
561 style: TextStyle( 563 style: TextStyle(
@@ -699,7 +701,12 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -699,7 +701,12 @@ class TableManagerPageState extends State<TableManagerPage> {
699 // ), 701 // ),
700 HEmptyView(20), 702 HEmptyView(20),
701 Container( 703 Container(
702 - width: ScreenUtil().setWidth(206), 704 + width: btnNum == 3 &&
  705 + (tableManagerModel.currTimeIndex == 3 ||
  706 + tableManagerModel.currTimeIndex == 1)
  707 + ? ScreenUtil().setWidth(206) +
  708 + ScreenUtil().setWidth(4)
  709 + : ScreenUtil().setWidth(206),
703 height: ScreenUtil().setWidth(74), 710 height: ScreenUtil().setWidth(74),
704 decoration: BoxDecoration( 711 decoration: BoxDecoration(
705 color: Color.fromRGBO(232, 232, 232, 1), 712 color: Color.fromRGBO(232, 232, 232, 1),
@@ -727,7 +734,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -727,7 +734,7 @@ class TableManagerPageState extends State<TableManagerPage> {
727 "00:00-00:00" 734 "00:00-00:00"
728 ? true 735 ? true
729 : false, 736 : false,
730 - width: ScreenUtil().setWidth(200) / btnNum, 737 + width: ScreenUtil().setWidth(206) / btnNum,
731 onPress: () { 738 onPress: () {
732 if (tableManagerModel.currTimeIndex == 1) 739 if (tableManagerModel.currTimeIndex == 1)
733 return; 740 return;
@@ -753,7 +760,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -753,7 +760,7 @@ class TableManagerPageState extends State<TableManagerPage> {
753 ? 1 760 ? 1
754 : 0, 761 : 0,
755 fontSize: 28, 762 fontSize: 28,
756 - width: ScreenUtil().setWidth(200) / btnNum, 763 + width: ScreenUtil().setWidth(206) / btnNum,
757 left: 764 left:
758 tableManagerModel.morning == "00:00-00:00" 765 tableManagerModel.morning == "00:00-00:00"
759 ? true 766 ? true
@@ -792,7 +799,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -792,7 +799,7 @@ class TableManagerPageState extends State<TableManagerPage> {
792 ? 1 799 ? 1
793 : 0, 800 : 0,
794 fontSize: 28, 801 fontSize: 28,
795 - width: ScreenUtil().setWidth(200) / btnNum, 802 + width: ScreenUtil().setWidth(206) / btnNum,
796 onPress: () { 803 onPress: () {
797 if (tableManagerModel.currTimeIndex == 3) 804 if (tableManagerModel.currTimeIndex == 3)
798 return; 805 return;
@@ -830,7 +837,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -830,7 +837,7 @@ class TableManagerPageState extends State<TableManagerPage> {
830 children: [ 837 children: [
831 Container( 838 Container(
832 color: MyColours.color_ffffff, 839 color: MyColours.color_ffffff,
833 - height: ScreenUtil().setWidth(90), 840 + height: ScreenUtil().setWidth(92),
834 margin: EdgeInsets.only( 841 margin: EdgeInsets.only(
835 bottom: ScreenUtil().setWidth(30)), 842 bottom: ScreenUtil().setWidth(30)),
836 child: Row( 843 child: Row(
@@ -1046,7 +1053,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -1046,7 +1053,7 @@ class TableManagerPageState extends State<TableManagerPage> {
1046 '仅看\n空座', 1053 '仅看\n空座',
1047 style: TextStyle( 1054 style: TextStyle(
1048 fontSize: 1055 fontSize:
1049 - ScreenUtil().setSp(30), 1056 + ScreenUtil().setSp(28),
1050 color: MyColours.color_333333, 1057 color: MyColours.color_333333,
1051 ), 1058 ),
1052 ), 1059 ),
@@ -569,13 +569,6 @@ packages: @@ -569,13 +569,6 @@ packages:
569 url: "https://pub.flutter-io.cn" 569 url: "https://pub.flutter-io.cn"
570 source: hosted 570 source: hosted
571 version: "3.5.1" 571 version: "3.5.1"
572 - keyboard_visibility:  
573 - dependency: "direct main"  
574 - description:  
575 - name: keyboard_visibility  
576 - url: "https://pub.flutter-io.cn"  
577 - source: hosted  
578 - version: "0.5.6"  
579 latlng: 572 latlng:
580 dependency: transitive 573 dependency: transitive
581 description: 574 description:
@@ -91,8 +91,7 @@ dependencies: @@ -91,8 +91,7 @@ dependencies:
91 package_info: ^0.4.0+18 91 package_info: ^0.4.0+18
92 # 获取设备信息 92 # 获取设备信息
93 device_info: ^0.4.2+4 93 device_info: ^0.4.2+4
94 -#监听键盘  
95 - keyboard_visibility: ^0.5.6 94 +
96 95
97 # 获取通讯录 96 # 获取通讯录
98 contacts_service: ^0.4.6 97 contacts_service: ^0.4.6