get method

Future<Contact?> get(
  1. String id, {
  2. Set<ContactProperty>? properties,
  3. Account? account,
  4. bool androidLookup = false,
})

Implementation

Future<Contact?> get(
  String id, {
  Set<ContactProperty>? properties,
  Account? account,
  bool androidLookup = false,
}) async {
  final props = properties ?? ContactProperties.none;
  final result = await _channel.invokeMethod<Map>(
    'crud.get',
    _withIosNotes({
      'id': id,
      'properties': props.toJson(),
      if (account != null) 'account': account.toJson(),
      if (androidLookup) 'lookup': true,
    }),
  );
  return JsonHelpers.decode(result, Contact.fromJson);
}