Commit 2095617c0ea30c35b23612294c1b7f9c994479f2

Authored by gaiyaguang
2 parents 2037d6c9 49e5e908

修复bug

@@ -857,8 +857,18 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { @@ -857,8 +857,18 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> {
857 _getContactData() async { 857 _getContactData() async {
858 Contact contact = await _contactPicker.selectContactWithNative(); 858 Contact contact = await _contactPicker.selectContactWithNative();
859 setState(() { 859 setState(() {
  860 + String fullName =
  861 + contact.fullName.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
  862 + String phone =
  863 + contact.phoneNumber.replaceAll(new RegExp(r"\s+\b|\b\s"), "");
  864 + if (fullName.compareTo(phone) == 0) {
  865 + fullName = '';
  866 + } else {
  867 + fullName = contact.fullName;
  868 + }
  869 +
860 _notebookDetailChangeModel.phoneController.text = contact.phoneNumber; 870 _notebookDetailChangeModel.phoneController.text = contact.phoneNumber;
861 - _notebookDetailChangeModel.nameController.text = contact.fullName; 871 + _notebookDetailChangeModel.nameController.text = fullName;
862 }); 872 });
863 } 873 }
864 874
@@ -735,16 +735,20 @@ class DialogUtil { @@ -735,16 +735,20 @@ class DialogUtil {
735 MyDivider( 735 MyDivider(
736 ScreenUtil().setWidth(280 * 2), ScreenUtil().setWidth(2), 736 ScreenUtil().setWidth(280 * 2), ScreenUtil().setWidth(2),
737 color: MyColours.color_efefef), 737 color: MyColours.color_efefef),
738 - FlatButton(  
739 - child: Text(  
740 - '去设置',  
741 - style: TextStyle(  
742 - color: MyColours.color_2bb5b7,  
743 - fontSize: ScreenUtil().setWidth(34)), 738 + InkWell(
  739 + child: Container(
  740 + height: ScreenUtil().setWidth(47 * 2),
  741 + alignment: Alignment.center,
  742 + child: Text(
  743 + '去设置',
  744 + style: TextStyle(
  745 + color: MyColours.color_2bb5b7,
  746 + fontSize: ScreenUtil().setWidth(34)),
  747 + ),
744 ), 748 ),
745 - onPressed: () { 749 + onTap: () {
746 openSetting(); 750 openSetting();
747 - // Navigator.pop(context, '确认'); 751 + Navigator.pop(context, '');
748 }, 752 },
749 ) 753 )
750 ], 754 ],