getContactsForEmail static method

Future<List<Contact>> getContactsForEmail(
  1. String email, {
  2. bool withThumbnails = true,
  3. bool photoHighResolution = true,
  4. bool orderByGivenName = true,
  5. bool iOSLocalizedLabels = true,
  6. bool androidLocalizedLabels = true,
})

Fetches all contacts, or when specified, the contacts with the email matching email Works only on iOS

Implementation

static Future<List<Contact>> getContactsForEmail(String email,
    {bool withThumbnails = true,
    bool photoHighResolution = true,
    bool orderByGivenName = true,
    bool iOSLocalizedLabels = true,
    bool androidLocalizedLabels = true}) async {
  List contacts =
      await _channel.invokeMethod('getContactsForEmail', <String, dynamic>{
    'email': email,
    'withThumbnails': withThumbnails,
    'photoHighResolution': photoHighResolution,
    'orderByGivenName': orderByGivenName,
    'iOSLocalizedLabels': iOSLocalizedLabels,
    'androidLocalizedLabels': androidLocalizedLabels,
  });
  return contacts.map((m) => Contact.fromMap(m)).toList();
}