getAll method

Future<List<Contact>> getAll({
  1. Set<ContactProperty>? properties,
  2. ContactFilter? filter,
  3. Account? account,
  4. int? limit,
})

Implementation

Future<List<Contact>> getAll({
  Set<ContactProperty>? properties,
  ContactFilter? filter,
  Account? account,
  int? limit,
}) async {
  final props = properties ?? ContactProperties.none;
  final result = await _channel.invokeMethod<List>(
    'crud.getAll',
    _withIosNotes({
      'properties': props.toJson(),
      if (filter != null) 'filter': filter.toJson(),
      if (account != null) 'account': account.toJson(),
      if (limit != null) 'limit': limit,
    }),
  );
  return JsonHelpers.decodeList(result, Contact.fromJson);
}