streamDetail method
Implementation
Stream<DocumentSnapshot> streamDetail({
required String collection,
String? collectionChild,
required String id,
String? idChild,
Map<String, dynamic>? data,
bool isErrorDialog = true,
Function(String? message)? onError,
}) {
if (collectionChild == null) {
return _firestore
// .doc(uid)
.collection(collection)
.doc(id)
// .orderBy("dateCreated", descending: true)
.snapshots();
} else {
return _firestore
.collection(collection)
.doc(id)
.collection(collectionChild)
.doc(idChild)
// .orderBy("dateCreated", descending: true)
.snapshots();
}
}