getContact method

Future<Contact> getContact (
  1. String id,
  2. {bool useHighResolutionPhotos: true,
  3. bool deduplicateEmailsAndPhones: true}
)

Fetches all fields for given contact

Implementation

static Future<Contact> getContact(
  String id, {
  bool useHighResolutionPhotos = true,
  bool deduplicateEmailsAndPhones = true,
}) async {
  final contacts = await _get(
      id: id,
      withDetails: true,
      withPhotos: true,
      useHighResolutionPhotos: useHighResolutionPhotos,
      deduplicateEmailsAndPhones: deduplicateEmailsAndPhones);
  if (contacts.isEmpty) return null;
  return contacts.first;
}