getContact method

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

Fetches all fields for given contact

Implementation

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