oneWithID<T> method
Checks if a document exists in Firestore using its type and ID.
Implementation
Future<bool> oneWithID<T>(Type type, String documentID, { String? subcollection }) async {
DocumentReference ref = FS.instance.collection(type.toString()).doc(documentID);
if (subcollection != null) {
ref = FS.instance.collection(type.toString()).doc(subcollection).collection(subcollection).doc(documentID);
}
DocumentSnapshot snapshot = await ref.get();
return snapshot.exists;
}