streamAllData<T> method
Streams all data from the specified path and returns it as a Stream<List<T>>.
path - The path to the data.
builder - The function to build the data.
Implementation
Stream<List<T>>? streamAllData<T>({
required String path,
required T Function(Map<String, dynamic>? jsondata, String docId) builder,
}) async* {
yield* _fireStore.collection(path).snapshots().map((snamp) {
return snamp.docs.map((d) {
return builder(d.data(), d.id);
}).toList();
});
}