delete method

  1. @override
Future<void> delete(
  1. String id
)
override

Deletes an item from the repository.

Implementation

@override
Future<void> delete(String id) {
  final doc = store.doc(_normaliseToFullPath(id));
  try {
    return doc.delete();
  } on firestore.FirebaseException catch (e) {
    if (e.code == 'not-found') {
      throw RepositoryException.notFound(id);
    }
    rethrow;
  }
}