getContacts static method
Fetches all contacts, or when specified, the contacts with a name
matching query
Implementation
static Future<List<Contact>> getContacts(
{String? query,
bool withThumbnails = true,
bool photoHighResolution = true,
bool orderByGivenName = true,
bool iOSLocalizedLabels = true,
bool androidLocalizedLabels = true}) async {
Iterable contacts =
await _channel.invokeMethod('getContacts', <String, dynamic>{
'query': query,
'withThumbnails': withThumbnails,
'photoHighResolution': photoHighResolution,
'orderByGivenName': orderByGivenName,
'iOSLocalizedLabels': iOSLocalizedLabels,
'androidLocalizedLabels': androidLocalizedLabels,
});
return contacts.map((m) => Contact.fromMap(m)).toList();
}