oneWithID method
Deletes a document from Firestore by its type and document ID.
Implementation
@override
Future<void> oneWithID(Type type, String documentID, { String? subcollection }) {
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);
if (subcollection != null) {
ref = FS.instance.collection(className).doc(subcollection).collection(subcollection).doc(documentID);
}
return ref.delete();
}