Commit 2b2b06f6c332cf0c1f8f38da261a1fe6681626d4

Authored by wdn127929
1 parent 5bc6495f

w5提交

... ... @@ -75,9 +75,9 @@ PODS:
- Flutter
- sign_in_with_apple (0.0.1):
- Flutter
- sqflite (0.0.1):
- sqflite (0.0.2):
- Flutter
- FMDB (~> 2.7.2)
- FMDB (>= 2.7.5)
- TPNS-iOS (1.2.7.2)
- tpns_flutter_plugin (1.0.4):
- Flutter
... ... @@ -239,7 +239,7 @@ SPEC CHECKSUMS:
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sign_in_with_apple: 34f3f5456a45fd7ac5fb42905e2ad31dae061b4a
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
TPNS-iOS: 9b35473a4a0d07f2c2730ea1e66c6749c2b98095
tpns_flutter_plugin: 8dbbee157aab91a878f64d056c1383726a6c5c4d
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
... ...
... ... @@ -487,7 +487,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 2.5.1;
MARKETING_VERSION = 2.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -631,7 +631,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 2.5.1;
MARKETING_VERSION = 2.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -666,7 +666,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 2.5.1;
MARKETING_VERSION = 2.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -5,6 +5,7 @@ import 'package:one_key/constant/state.dart';
import 'package:one_key/provider/contant_show_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/page_exception.dart';
... ... @@ -50,6 +51,8 @@ class _ContantLeftPageState extends State<ContantLeftPage> {
callback: () {
// offset = 0;
// getMessages();
model.pageStateLeft = PageState.Loading;
model.notifyListeners();
_getContantData();
},
emptyMsg: "暂时没有联系人哦",
... ... @@ -60,49 +63,57 @@ class _ContantLeftPageState extends State<ContantLeftPage> {
return ListView.builder(
itemCount: model.userHistorys.length,
itemBuilder: (BuildContext context, int index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
index == 0
? MyDivider(
double.infinity,
ScreenUtil().setWidth(20),
color: MyColours.color_f5f5f5,
)
: Container(),
Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(30)),
height: ScreenUtil().setWidth(74 * 2),
decoration: BoxDecoration(
border: Border(
top: index == 0
? BorderSide(
width: ScreenUtil().setWidth(2),
color: MyColours.color_E0E0E0)
: BorderSide(
width: 0, color: Colors.transparent),
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: MyColours.color_E0E0E0))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(model.userHistorys[index].rname,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32))),
VEmptyView(10),
Text(model.userHistorys[index].phone,
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30)))
],
),
)
]);
return InkWell(
onTap: () {
if (model.userHistorys[index].phone != null &&
model.userHistorys[index].phone != '') {
DialogUtil.goPhone(model.userHistorys[index].phone);
}
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
index == 0
? MyDivider(
double.infinity,
ScreenUtil().setWidth(20),
color: MyColours.color_f5f5f5,
)
: Container(),
Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(30)),
height: ScreenUtil().setWidth(74 * 2),
decoration: BoxDecoration(
border: Border(
top: index == 0
? BorderSide(
width: ScreenUtil().setWidth(2),
color: MyColours.color_E0E0E0)
: BorderSide(
width: 0, color: Colors.transparent),
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: MyColours.color_E0E0E0))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(model.userHistorys[index].rname,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32))),
VEmptyView(10),
Text(model.userHistorys[index].phone,
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30)))
],
),
)
]),
);
});
// onRefresh: () async {
... ...
... ... @@ -128,23 +128,15 @@ class _ContantRightPageState extends State<ContantRightPage> {
});
// Lazy load thumbnails after rendering initial contacts.
for (final contact in contacts) {
ContactsService.getAvatar(contact).then((avatar) {
if (avatar == null) return; // Don't redraw if no change.
setState(() => contact.avatar = avatar);
});
}
// for (final contact in contacts) {
// ContactsService.getAvatar(contact).then((avatar) {
// if (avatar == null) return; // Don't redraw if no change.
// setState(() => contact.avatar = avatar);
// });
// }
}
void updateContact() async {
Contact ninja = _contacts
.toList()
.firstWhere((contact) => contact.familyName.startsWith("Ninja"));
ninja.avatar = null;
await ContactsService.updateContact(ninja);
refreshContacts();
}
_openContactForm() async {
try {
... ... @@ -220,7 +212,6 @@ class _ContantRightPageState extends State<ContantRightPage> {
goSetting = true;
openSetting();
}
;
},
emptyMsg: "暂时没有联系人哦",
emptyImg: "empty_search",
... ... @@ -230,49 +221,56 @@ class _ContantRightPageState extends State<ContantRightPage> {
itemCount: _contacts?.length ?? 0,
itemBuilder: (BuildContext context, int index) {
Contact c = _contacts?.elementAt(index);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
index == 0
? MyDivider(
double.infinity,
ScreenUtil().setWidth(20),
color: MyColours.color_f5f5f5,
)
: Container(),
Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(30)),
height: ScreenUtil().setWidth(74 * 2),
decoration: BoxDecoration(
border: Border(
top: index == 0
? BorderSide(
return InkWell(
onTap: () {
if (c.phones.first.value != null &&
c.phones.first.value != '') {
DialogUtil.goPhone(c.phones.first.value);
}
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
index == 0
? MyDivider(
double.infinity,
ScreenUtil().setWidth(20),
color: MyColours.color_f5f5f5,
)
: Container(),
Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(30)),
height: ScreenUtil().setWidth(74 * 2),
decoration: BoxDecoration(
border: Border(
top: index == 0
? BorderSide(
width: ScreenUtil().setWidth(2),
color: MyColours.color_E0E0E0)
: BorderSide(
width: 0, color: Colors.transparent),
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: MyColours.color_E0E0E0)
: BorderSide(
width: 0, color: Colors.transparent),
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: MyColours.color_E0E0E0))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(c.displayName,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32))),
VEmptyView(10),
Text(c.phones.first.value,
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30)))
],
),
)
]);
color: MyColours.color_E0E0E0))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(c.displayName,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32))),
VEmptyView(10),
Text(c.phones.first.value,
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30)))
],
),
)
]));
});
}
}
... ...