Просмотр исходного кода

[fix]无号码联系人,增加提示

云天逵 11 месяцев назад
Родитель
Сommit
464a65e003

+ 1 - 1
lib/module/contact/all/all_view.dart

@@ -218,7 +218,7 @@ class AllPage extends BasePage<AllController> {
                                             ),
                                             Text(
                                               contact.phones.isEmpty
-                                                  ? ''
+                                                  ? 'No contact number'
                                                   : contact.phones.first.number,
 
                                               style: TextStyle(

+ 4 - 2
lib/module/contact/duplicate/view.dart

@@ -204,7 +204,9 @@ class ContactDuplicatePage extends BasePage<ContactDuplicateController> {
                                   ),
                                 ),
                                 Text(
-                                  contact?.phones.first.number ?? "",
+                                  contact?.phones.isEmpty ?? true
+                                      ? 'No contact number'
+                                      : contact?.phones.first.number ?? "",
                                   style: TextStyle(
                                     color: Colors.white.withOpacity(0.8),
                                     fontSize: 12.sp,
@@ -302,7 +304,7 @@ class ContactDuplicatePage extends BasePage<ContactDuplicateController> {
                                       ),
                                       Text(
                                         contact.phones.isEmpty
-                                            ? ''
+                                            ? 'No contact number'
                                             : contact.phones.first.number,
                                         style: TextStyle(
                                           color: Colors.white.withOpacity(0.8),

+ 1 - 1
lib/module/contact/incomplete/view.dart

@@ -222,7 +222,7 @@ class ContactIncompletePage extends BasePage<ContactInCompleteController> {
                                             ),
                                             Text(
                                               contact.phones.isEmpty
-                                                  ? ''
+                                                  ? 'No contact number'
                                                   : contact.phones.first.number,
                                               style: TextStyle(
                                                 color: Colors.white,