A Flutter contact picker.Writted with pure dart, supported both iOS and Android.
Get address book permissions before using.
easy_contact_picker: ^0.0.2
import 'package:easy_contact_picker/easy_contact_picker.dart';
<uses-permission android:name="android.permission.READ_CONTACTS"/>
Privacy - Contacts Usage Description
Future<List<Contact>> selectContacts() async {
final List result =
await _channel.invokeMethod('selectContactList');
if (result == null) {
return null;
}
List<Contact> contacts = new List();
result.forEach((f){
contacts.add(new Contact.fromMap(f));
});
return contacts;
}
Future<Contact> selectContactWithNative() async {
final Map<dynamic, dynamic> result =
await _channel.invokeMethod('selectContactNative');
if (result == null) {
return null;
}
return new Contact.fromMap(result);
}