oneWithID method

dynamic oneWithID(
  1. Type type,
  2. String documentID
)

Deletes a document from Firestore by its type and document ID.

Implementation

oneWithID(Type type, String documentID) async {
  final String? className = FS.classNames[type];
  if (className == null) {
    throw UnsupportedError('No class name found for type: ${className}. Consider re-generating Firestorm data classes.');
  }
  DocumentReference ref = FS.instance.collection(className).doc(documentID);
  return _batch.delete(ref);
}