Showing
4 changed files
with
216 additions
and
69 deletions
assets/phone_list.png
0 → 100644
5.97 KB
| @@ -11,6 +11,7 @@ import 'package:one_key/provider/notebook_detail_change_model.dart'; | @@ -11,6 +11,7 @@ import 'package:one_key/provider/notebook_detail_change_model.dart'; | ||
| 11 | import 'package:one_key/provider/notebook_detail_model.dart'; | 11 | import 'package:one_key/provider/notebook_detail_model.dart'; |
| 12 | import 'package:one_key/provider/user_model.dart'; | 12 | import 'package:one_key/provider/user_model.dart'; |
| 13 | import 'package:one_key/res/colors.dart'; | 13 | import 'package:one_key/res/colors.dart'; |
| 14 | +import 'package:one_key/res/styles.dart'; | ||
| 14 | import 'package:one_key/utils/dialog_util.dart'; | 15 | import 'package:one_key/utils/dialog_util.dart'; |
| 15 | import 'package:one_key/utils/event_bus.dart'; | 16 | import 'package:one_key/utils/event_bus.dart'; |
| 16 | import 'package:one_key/utils/misc.dart'; | 17 | import 'package:one_key/utils/misc.dart'; |
| @@ -21,6 +22,7 @@ import 'package:one_key/widgets/app_bar.dart'; | @@ -21,6 +22,7 @@ import 'package:one_key/widgets/app_bar.dart'; | ||
| 21 | import 'package:one_key/widgets/common_button.dart'; | 22 | import 'package:one_key/widgets/common_button.dart'; |
| 22 | import 'package:one_key/widgets/h_empty_view.dart'; | 23 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 23 | import 'package:one_key/widgets/new_table_item.dart'; | 24 | import 'package:one_key/widgets/new_table_item.dart'; |
| 25 | +import 'package:one_key/widgets/round_button.dart'; | ||
| 24 | import 'package:one_key/widgets/table_item.dart'; | 26 | import 'package:one_key/widgets/table_item.dart'; |
| 25 | import 'package:one_key/widgets/v_empty_view.dart'; | 27 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 26 | import 'package:permission_handler/permission_handler.dart'; | 28 | import 'package:permission_handler/permission_handler.dart'; |
| @@ -102,7 +104,9 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -102,7 +104,9 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 102 | 104 | ||
| 103 | _topWidget() { | 105 | _topWidget() { |
| 104 | return Container( | 106 | return Container( |
| 105 | - padding: EdgeInsets.all(ScreenUtil().setWidth(40)), | 107 | + padding: EdgeInsets.symmetric( |
| 108 | + horizontal: ScreenUtil().setWidth(40), | ||
| 109 | + vertical: ScreenUtil().setWidth(20)), | ||
| 106 | child: Column( | 110 | child: Column( |
| 107 | children: [ | 111 | children: [ |
| 108 | //第一行 日期选择 | 112 | //第一行 日期选择 |
| @@ -173,7 +177,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -173,7 +177,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 173 | ); | 177 | ); |
| 174 | }).toList()), | 178 | }).toList()), |
| 175 | 179 | ||
| 176 | - VEmptyView(60), | 180 | + VEmptyView(40), |
| 177 | //早市、午市、晚市 | 181 | //早市、午市、晚市 |
| 178 | Row( | 182 | Row( |
| 179 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, | 183 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| @@ -233,7 +237,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -233,7 +237,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 233 | ), | 237 | ), |
| 234 | ); | 238 | ); |
| 235 | }).toList()), | 239 | }).toList()), |
| 236 | - VEmptyView(60), | 240 | + VEmptyView(40), |
| 237 | 241 | ||
| 238 | ///人数选择 | 242 | ///人数选择 |
| 239 | Row( | 243 | Row( |
| @@ -293,7 +297,8 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -293,7 +297,8 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 293 | model: _notebookDetailChangeModel, | 297 | model: _notebookDetailChangeModel, |
| 294 | ); | 298 | ); |
| 295 | }).toList(), | 299 | }).toList(), |
| 296 | - ) | 300 | + ), |
| 301 | + VEmptyView(20), | ||
| 297 | ], | 302 | ], |
| 298 | ), | 303 | ), |
| 299 | ); | 304 | ); |
| @@ -469,9 +474,46 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -469,9 +474,46 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 469 | padding: EdgeInsets.symmetric( | 474 | padding: EdgeInsets.symmetric( |
| 470 | horizontal: ScreenUtil().setWidth(40), | 475 | horizontal: ScreenUtil().setWidth(40), |
| 471 | ), | 476 | ), |
| 472 | - margin: EdgeInsets.only(top: ScreenUtil().setWidth(72)), | 477 | + // margin: EdgeInsets.only(top: ScreenUtil().setWidth(72)), |
| 473 | child: Column( | 478 | child: Column( |
| 474 | children: [ | 479 | children: [ |
| 480 | + InkWell( | ||
| 481 | + onTap: () { | ||
| 482 | + _openAddressBook(); | ||
| 483 | + }, | ||
| 484 | + child: Container( | ||
| 485 | + height: ScreenUtil().setWidth(120), | ||
| 486 | + child: Row( | ||
| 487 | + children: [ | ||
| 488 | + Image.asset( | ||
| 489 | + Utils.getImgPath('phone_list'), | ||
| 490 | + width: ScreenUtil().setWidth(26 * 2), | ||
| 491 | + height: ScreenUtil().setWidth(26 * 2), | ||
| 492 | + ), | ||
| 493 | + HEmptyView(20), | ||
| 494 | + Container( | ||
| 495 | + height: ScreenUtil().setWidth(48), | ||
| 496 | + alignment: Alignment.center, | ||
| 497 | + child: Text( | ||
| 498 | + '一键录入', | ||
| 499 | + style: TextStyle( | ||
| 500 | + color: MyColours.color_353535, | ||
| 501 | + fontSize: ScreenUtil().setSp(34)), | ||
| 502 | + ), | ||
| 503 | + ), | ||
| 504 | + Spacer(), | ||
| 505 | + Image.asset( | ||
| 506 | + 'assets/arr_right_gray.png', | ||
| 507 | + width: ScreenUtil().setWidth(12), | ||
| 508 | + height: ScreenUtil().setWidth(22), | ||
| 509 | + ) | ||
| 510 | + ], | ||
| 511 | + ), | ||
| 512 | + ), | ||
| 513 | + ), | ||
| 514 | + MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2), | ||
| 515 | + color: MyColours.color_F1F0F4), | ||
| 516 | + VEmptyView(52), | ||
| 475 | Row( | 517 | Row( |
| 476 | mainAxisAlignment: MainAxisAlignment.spaceBetween, | 518 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 477 | crossAxisAlignment: CrossAxisAlignment.center, | 519 | crossAxisAlignment: CrossAxisAlignment.center, |
| @@ -479,15 +521,16 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -479,15 +521,16 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 479 | Expanded( | 521 | Expanded( |
| 480 | child: TextField( | 522 | child: TextField( |
| 481 | maxLines: 1, | 523 | maxLines: 1, |
| 524 | + | ||
| 482 | //输入文本的样式 | 525 | //输入文本的样式 |
| 483 | style: TextStyle( | 526 | style: TextStyle( |
| 484 | fontSize: ScreenUtil().setSp(34), | 527 | fontSize: ScreenUtil().setSp(34), |
| 485 | color: MyColours.color_353535), | 528 | color: MyColours.color_353535), |
| 486 | - controller: _notebookDetailChangeModel.phoneController, | ||
| 487 | - focusNode: _phoneNode, | 529 | + controller: _notebookDetailChangeModel.nameController, |
| 530 | + focusNode: _nameNode, | ||
| 488 | // textAlignVertical: TextAlignVertical.top, | 531 | // textAlignVertical: TextAlignVertical.top, |
| 489 | decoration: InputDecoration( | 532 | decoration: InputDecoration( |
| 490 | - hintText: "客户电话", | 533 | + hintText: "客户姓名(必填)", |
| 491 | hintStyle: TextStyle( | 534 | hintStyle: TextStyle( |
| 492 | color: MyColours.color_999999, | 535 | color: MyColours.color_999999, |
| 493 | fontSize: ScreenUtil().setSp(34), | 536 | fontSize: ScreenUtil().setSp(34), |
| @@ -496,50 +539,39 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -496,50 +539,39 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 496 | // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)), | 539 | // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)), |
| 497 | border: InputBorder.none, | 540 | border: InputBorder.none, |
| 498 | ), | 541 | ), |
| 499 | - onChanged: (value) {}, | 542 | + onChanged: (value) { |
| 543 | + print('ggg'); | ||
| 544 | + }, | ||
| 500 | onEditingComplete: () { | 545 | onEditingComplete: () { |
| 501 | print('fff'); | 546 | print('fff'); |
| 502 | - _phoneNode.unfocus(); | 547 | + _nameNode.unfocus(); |
| 503 | }, | 548 | }, |
| 504 | - keyboardType: TextInputType.number, | ||
| 505 | - ), | ||
| 506 | - ), | ||
| 507 | - HEmptyView(40), | ||
| 508 | - InkWell( | ||
| 509 | - onTap: () { | ||
| 510 | - _openAddressBook(); | ||
| 511 | - }, | ||
| 512 | - child: Text( | ||
| 513 | - '打开通讯录', | ||
| 514 | - style: TextStyle( | ||
| 515 | - color: MyColours.color_199095, | ||
| 516 | - fontSize: ScreenUtil().setSp(34), | ||
| 517 | - ), | 549 | + keyboardType: TextInputType.text, |
| 518 | ), | 550 | ), |
| 519 | ), | 551 | ), |
| 520 | HEmptyView(40), | 552 | HEmptyView(40), |
| 521 | - InkWell( | ||
| 522 | - onTap: () { | ||
| 523 | - _showDateChooseWidget(context); | ||
| 524 | - }, | ||
| 525 | - child: Text( | ||
| 526 | - int.parse(widget.detailEntity.is_set_ddate) == 0 | ||
| 527 | - ? '未设置到店时间' | ||
| 528 | - : _notebookDetailChangeModel.ddateStr, | ||
| 529 | - style: TextStyle( | ||
| 530 | - color: int.parse(widget.detailEntity.is_set_ddate) == 0 | ||
| 531 | - ? MyColours.color_999999 | ||
| 532 | - : MyColours.color_199095, | ||
| 533 | - fontSize: ScreenUtil().setSp(34), | ||
| 534 | - ), | ||
| 535 | - ), | ||
| 536 | - ), | 553 | + Row( |
| 554 | + children: _notebookDetailChangeModel.sexList.map((value) { | ||
| 555 | + return _callButton( | ||
| 556 | + onPress: () { | ||
| 557 | + for (var item in _notebookDetailChangeModel.sexList) { | ||
| 558 | + item['select'] = false; | ||
| 559 | + if (item['title'] == value['title']) { | ||
| 560 | + item['select'] = true; | ||
| 561 | + } | ||
| 562 | + } | ||
| 563 | + _notebookDetailChangeModel.notifyListeners(); | ||
| 564 | + }, | ||
| 565 | + content: value['title'], | ||
| 566 | + hasLeftBorder: value['hasLeftBorder'], | ||
| 567 | + isSelect: value['select']); | ||
| 568 | + }).toList()), | ||
| 537 | ], | 569 | ], |
| 538 | ), | 570 | ), |
| 539 | VEmptyView(40), | 571 | VEmptyView(40), |
| 540 | MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2), | 572 | MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2), |
| 541 | color: MyColours.color_F1F0F4), | 573 | color: MyColours.color_F1F0F4), |
| 542 | - VEmptyView(72), | 574 | + VEmptyView(52), |
| 543 | Row( | 575 | Row( |
| 544 | mainAxisAlignment: MainAxisAlignment.spaceBetween, | 576 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 545 | crossAxisAlignment: CrossAxisAlignment.center, | 577 | crossAxisAlignment: CrossAxisAlignment.center, |
| @@ -547,16 +579,15 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -547,16 +579,15 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 547 | Expanded( | 579 | Expanded( |
| 548 | child: TextField( | 580 | child: TextField( |
| 549 | maxLines: 1, | 581 | maxLines: 1, |
| 550 | - | ||
| 551 | //输入文本的样式 | 582 | //输入文本的样式 |
| 552 | style: TextStyle( | 583 | style: TextStyle( |
| 553 | fontSize: ScreenUtil().setSp(34), | 584 | fontSize: ScreenUtil().setSp(34), |
| 554 | color: MyColours.color_353535), | 585 | color: MyColours.color_353535), |
| 555 | - controller: _notebookDetailChangeModel.nameController, | ||
| 556 | - focusNode: _nameNode, | 586 | + controller: _notebookDetailChangeModel.phoneController, |
| 587 | + focusNode: _phoneNode, | ||
| 557 | // textAlignVertical: TextAlignVertical.top, | 588 | // textAlignVertical: TextAlignVertical.top, |
| 558 | decoration: InputDecoration( | 589 | decoration: InputDecoration( |
| 559 | - hintText: "客户姓名(必填)", | 590 | + hintText: "客户电话", |
| 560 | hintStyle: TextStyle( | 591 | hintStyle: TextStyle( |
| 561 | color: MyColours.color_999999, | 592 | color: MyColours.color_999999, |
| 562 | fontSize: ScreenUtil().setSp(34), | 593 | fontSize: ScreenUtil().setSp(34), |
| @@ -565,39 +596,49 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -565,39 +596,49 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 565 | // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)), | 596 | // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)), |
| 566 | border: InputBorder.none, | 597 | border: InputBorder.none, |
| 567 | ), | 598 | ), |
| 568 | - onChanged: (value) { | ||
| 569 | - print('ggg'); | ||
| 570 | - }, | 599 | + onChanged: (value) {}, |
| 571 | onEditingComplete: () { | 600 | onEditingComplete: () { |
| 572 | print('fff'); | 601 | print('fff'); |
| 573 | - _nameNode.unfocus(); | 602 | + _phoneNode.unfocus(); |
| 574 | }, | 603 | }, |
| 575 | - keyboardType: TextInputType.text, | 604 | + keyboardType: TextInputType.number, |
| 576 | ), | 605 | ), |
| 577 | ), | 606 | ), |
| 578 | HEmptyView(40), | 607 | HEmptyView(40), |
| 579 | - Row( | ||
| 580 | - children: _notebookDetailChangeModel.sexList.map((value) { | ||
| 581 | - return _callButton( | ||
| 582 | - onPress: () { | ||
| 583 | - for (var item in _notebookDetailChangeModel.sexList) { | ||
| 584 | - item['select'] = false; | ||
| 585 | - if (item['title'] == value['title']) { | ||
| 586 | - item['select'] = true; | ||
| 587 | - } | ||
| 588 | - } | ||
| 589 | - _notebookDetailChangeModel.notifyListeners(); | ||
| 590 | - }, | ||
| 591 | - content: value['title'], | ||
| 592 | - hasLeftBorder: value['hasLeftBorder'], | ||
| 593 | - isSelect: value['select']); | ||
| 594 | - }).toList()), | 608 | + Container( |
| 609 | + height: ScreenUtil().setWidth(48), | ||
| 610 | + width: ScreenUtil().setWidth(84 * 2), | ||
| 611 | + child: RoundButton( | ||
| 612 | + height: ScreenUtil().setWidth(80), | ||
| 613 | + width: ScreenUtil().setWidth(300), | ||
| 614 | + radius: ScreenUtil().setWidth(0), | ||
| 615 | + fontSize: 28, | ||
| 616 | + isBold: false, | ||
| 617 | + text: int.parse(widget.detailEntity.is_set_ddate) == 0 | ||
| 618 | + ? '设置时间' | ||
| 619 | + : _notebookDetailChangeModel.ddateStr, | ||
| 620 | + onPressed: () { | ||
| 621 | + _showDateChooseWidget(context); | ||
| 622 | + } | ||
| 623 | + // Text( | ||
| 624 | + // int.parse(widget.detailEntity.is_set_ddate) == 0 | ||
| 625 | + // ? '未设置到店时间' | ||
| 626 | + // : _notebookDetailChangeModel.ddateStr, | ||
| 627 | + // style: TextStyle( | ||
| 628 | + // color: int.parse(widget.detailEntity.is_set_ddate) == 0 | ||
| 629 | + // ? MyColours.color_999999 | ||
| 630 | + // : MyColours.color_199095, | ||
| 631 | + // fontSize: ScreenUtil().setSp(34), | ||
| 632 | + // ), | ||
| 633 | + // ), | ||
| 634 | + ), | ||
| 635 | + ) | ||
| 595 | ], | 636 | ], |
| 596 | ), | 637 | ), |
| 597 | VEmptyView(40), | 638 | VEmptyView(40), |
| 598 | MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2), | 639 | MyDivider(ScreenUtil().setWidth(335 * 2), ScreenUtil().setWidth(2), |
| 599 | color: MyColours.color_F1F0F4), | 640 | color: MyColours.color_F1F0F4), |
| 600 | - VEmptyView(72), | 641 | + VEmptyView(52), |
| 601 | TextField( | 642 | TextField( |
| 602 | maxLines: 1, | 643 | maxLines: 1, |
| 603 | inputFormatters: [LengthLimitingTextInputFormatter(25)], | 644 | inputFormatters: [LengthLimitingTextInputFormatter(25)], |
| @@ -797,6 +838,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -797,6 +838,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 797 | if (permissionStatus == PermissionStatus.neverAskAgain) { | 838 | if (permissionStatus == PermissionStatus.neverAskAgain) { |
| 798 | //用户选择不在弹出权限提示框 | 839 | //用户选择不在弹出权限提示框 |
| 799 | print('never'); | 840 | print('never'); |
| 841 | + DialogUtil.openAlertDialog(context); | ||
| 800 | } else { | 842 | } else { |
| 801 | // 申请权限 | 843 | // 申请权限 |
| 802 | bool canContacts = await requestContactPermission(); | 844 | bool canContacts = await requestContactPermission(); |
| @@ -804,7 +846,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -804,7 +846,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 804 | _getContactData(); | 846 | _getContactData(); |
| 805 | } else { | 847 | } else { |
| 806 | //拒绝通讯录权限 , 苹果拒绝权限后,不再提示权限框,进入此处 | 848 | //拒绝通讯录权限 , 苹果拒绝权限后,不再提示权限框,进入此处 |
| 807 | - print(canContacts); | 849 | + DialogUtil.openAlertDialog(context); |
| 808 | } | 850 | } |
| 809 | } | 851 | } |
| 810 | } else { | 852 | } else { |
| @@ -47,4 +47,5 @@ class MyColours { | @@ -47,4 +47,5 @@ class MyColours { | ||
| 47 | static const Color color_E95750 = Color(0xffE95750); | 47 | static const Color color_E95750 = Color(0xffE95750); |
| 48 | static const Color color_A9E3E6 = Color(0xffA9E3E6); | 48 | static const Color color_A9E3E6 = Color(0xffA9E3E6); |
| 49 | static const Color color_e5e5e5 = Color(0xffe5e5e5); | 49 | static const Color color_e5e5e5 = Color(0xffe5e5e5); |
| 50 | + static const Color color_efefef = Color(0xffefefef); | ||
| 50 | } | 51 | } |
| @@ -8,8 +8,10 @@ import 'package:one_key/constant/constant.dart'; | @@ -8,8 +8,10 @@ import 'package:one_key/constant/constant.dart'; | ||
| 8 | import 'package:one_key/pages/message/message_dialog_item.dart'; | 8 | import 'package:one_key/pages/message/message_dialog_item.dart'; |
| 9 | import 'package:one_key/provider/message_dialog_model.dart'; | 9 | import 'package:one_key/provider/message_dialog_model.dart'; |
| 10 | import 'package:one_key/res/colors.dart'; | 10 | import 'package:one_key/res/colors.dart'; |
| 11 | +import 'package:one_key/utils/misc.dart'; | ||
| 11 | import 'package:one_key/utils/navigator_util.dart'; | 12 | import 'package:one_key/utils/navigator_util.dart'; |
| 12 | import 'package:one_key/utils/utils.dart'; | 13 | import 'package:one_key/utils/utils.dart'; |
| 14 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 13 | import 'package:one_key/widgets/common_button.dart'; | 15 | import 'package:one_key/widgets/common_button.dart'; |
| 14 | import 'package:one_key/widgets/table_item.dart'; | 16 | import 'package:one_key/widgets/table_item.dart'; |
| 15 | import 'package:one_key/widgets/v_empty_view.dart'; | 17 | import 'package:one_key/widgets/v_empty_view.dart'; |
| @@ -199,7 +201,7 @@ class DialogUtil { | @@ -199,7 +201,7 @@ class DialogUtil { | ||
| 199 | TableCalendar( | 201 | TableCalendar( |
| 200 | calendarController: _calendarController, | 202 | calendarController: _calendarController, |
| 201 | initialSelectedDay: selectDateTime, | 203 | initialSelectedDay: selectDateTime, |
| 202 | - onDaySelected: (day, events,holidays) { | 204 | + onDaySelected: (day, events, holidays) { |
| 203 | Navigator.of(dialogContext).pop(day); | 205 | Navigator.of(dialogContext).pop(day); |
| 204 | }, | 206 | }, |
| 205 | availableGestures: AvailableGestures.none, | 207 | availableGestures: AvailableGestures.none, |
| @@ -677,4 +679,106 @@ class DialogUtil { | @@ -677,4 +679,106 @@ class DialogUtil { | ||
| 677 | return value; | 679 | return value; |
| 678 | }); | 680 | }); |
| 679 | } | 681 | } |
| 682 | + | ||
| 683 | + static Future openAlertDialog(BuildContext context) async { | ||
| 684 | + final action = await showDialog( | ||
| 685 | + context: context, | ||
| 686 | + barrierDismissible: true, | ||
| 687 | + builder: (BuildContext context) { | ||
| 688 | + return Center( | ||
| 689 | + child: Container( | ||
| 690 | + height: ScreenUtil().setWidth(160 * 2 + 20), | ||
| 691 | + width: ScreenUtil().setWidth(280 * 2), | ||
| 692 | + decoration: BoxDecoration( | ||
| 693 | + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))), | ||
| 694 | + child: Card( | ||
| 695 | + shape: RoundedRectangleBorder( | ||
| 696 | + borderRadius: BorderRadius.all( | ||
| 697 | + Radius.circular(ScreenUtil().setWidth(30)))), //设置圆角 | ||
| 698 | + child: Column( | ||
| 699 | + children: [ | ||
| 700 | + VEmptyView(40), | ||
| 701 | + Container( | ||
| 702 | + height: ScreenUtil().setWidth(48), | ||
| 703 | + alignment: Alignment.center, | ||
| 704 | + child: Text('未获得通讯录权限', | ||
| 705 | + style: TextStyle( | ||
| 706 | + fontSize: ScreenUtil().setSp(36), | ||
| 707 | + color: MyColours.color_353535)), | ||
| 708 | + ), | ||
| 709 | + VEmptyView(20), | ||
| 710 | + Container( | ||
| 711 | + // height: ScreenUtil().setWidth(80), | ||
| 712 | + // color: Colors.red, | ||
| 713 | + padding: EdgeInsets.symmetric( | ||
| 714 | + horizontal: ScreenUtil().setWidth(68)), | ||
| 715 | + alignment: Alignment.center, | ||
| 716 | + child: Transform.translate( | ||
| 717 | + offset: Offset( | ||
| 718 | + 0, | ||
| 719 | + ScreenUtil().setWidth(2) / | ||
| 720 | + ScreenUtil() | ||
| 721 | + .setWidth(2)), //1为 StrutStyle 的 leading的值 | ||
| 722 | + child: Text( | ||
| 723 | + "请在手机的权限管理里,将联系人权限开启", | ||
| 724 | + style: TextStyle( | ||
| 725 | + color: MyColours.color_353535, | ||
| 726 | + fontSize: ScreenUtil().setSp(28), | ||
| 727 | + ), | ||
| 728 | + strutStyle: StrutStyle( | ||
| 729 | + forceStrutHeight: true, | ||
| 730 | + height: ScreenUtil().setWidth(0.8), | ||
| 731 | + leading: ScreenUtil().setWidth(2)), | ||
| 732 | + ), | ||
| 733 | + )), | ||
| 734 | + VEmptyView(28), | ||
| 735 | + MyDivider( | ||
| 736 | + ScreenUtil().setWidth(280 * 2), ScreenUtil().setWidth(2), | ||
| 737 | + color: MyColours.color_efefef), | ||
| 738 | + FlatButton( | ||
| 739 | + child: Text( | ||
| 740 | + '去设置', | ||
| 741 | + style: TextStyle( | ||
| 742 | + color: MyColours.color_2bb5b7, | ||
| 743 | + fontSize: ScreenUtil().setWidth(34)), | ||
| 744 | + ), | ||
| 745 | + onPressed: () { | ||
| 746 | + openSetting(); | ||
| 747 | + // Navigator.pop(context, '确认'); | ||
| 748 | + }, | ||
| 749 | + ) | ||
| 750 | + ], | ||
| 751 | + ), | ||
| 752 | + ), | ||
| 753 | + ), | ||
| 754 | + ); | ||
| 755 | + // return AlertDialog( | ||
| 756 | + // title: Text('未获得通讯录权限'), | ||
| 757 | + // content: Text('请在手机的权限管理里,将联系人权限开启'), | ||
| 758 | + // actions: <Widget>[ | ||
| 759 | + // FlatButton( | ||
| 760 | + // child: Text('去设置'), | ||
| 761 | + // onPressed: () { | ||
| 762 | + // Navigator.pop(context, '确认'); | ||
| 763 | + // }, | ||
| 764 | + // ), | ||
| 765 | + // ], | ||
| 766 | + // ); | ||
| 767 | + }, | ||
| 768 | + ); | ||
| 769 | + | ||
| 770 | + switch (action) { | ||
| 771 | + // case Action.Ok: | ||
| 772 | + // setState(() { | ||
| 773 | + // _choice = 'Ok'; | ||
| 774 | + // }); | ||
| 775 | + // break; | ||
| 776 | + // case Action.Cancel: | ||
| 777 | + // setState(() { | ||
| 778 | + // _choice = 'Cancel'; | ||
| 779 | + // }); | ||
| 780 | + // break; | ||
| 781 | + // default: | ||
| 782 | + } | ||
| 783 | + } | ||
| 680 | } | 784 | } |
-
Please register or login to post a comment