loadAllData<T> method
Loads all data from the specified path and returns it as a Future<T>.
path - The path to the data.
builder - The function to build the data.
Implementation
Future<T> loadAllData<T>({
required String path,
required T Function(Map<String, dynamic>? data, String documentId) builder,
}) {
final reference = _fireStore.doc(path);
final snapshots = reference.get();
return snapshots.then((snapshot) => builder(snapshot.data(), snapshot.id));
}