contacts_plugin_plus

Creator: coderz1093

Last updated:

0 purchases

contacts_plugin_plus Image
contacts_plugin_plus Images

Languages

Categories

Add to Cart

Description:

contacts plugin plus

contacts_plugin #
支持Android和iOS端 #
获取联系人和选择联系人使用示例
选择联系人
ContactsPlugin.selectContact().then((value) {
// if (value != null) {
// var name = value["name"] ?? "";
// var number = value["number"] ?? "";
var name = value.name ?? "";
var number = value.number ?? "";
setState(() {
selectText = name + "/" + number;
});
// }
});
copied to clipboard
获取全部联系人
ContactsPlugin.getAllContacts().then((value) {
for (var contact in value) {
var number = "";
if (contact.phones != null &&
contact.phones!.isNotEmpty) {
number = contact.phones?.first.value ?? "";
}
var name = contact.otherName ?? "";
debugPrint("phone:" + number);
debugPrint("name:" + name);
}
setState(() {
allContacts = "The number of all contacts is:" +
value.length.toString();
});
});
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.