delete method

Future<bool> delete(
  1. ISunnyContact input
)
inherited

Implementation

Future<bool> delete(V input) async {
  if (_data.containsKey(input.mkey)) {
    _internalGet(input.mkey).update(null, force: true);
  }
  return applyChanges((_) async {
    final id = input.mkey;
    await beforeDelete(input);
    final response = await repository.delete(repository.keyToId(id)!);
    await afterDelete(id);
    _data.remove(input.mkey);
    return response.deleted;
  });
}