getCollectionStream<Model extends BaseModel> method
Implementation
@override
Stream<List<Model>> getCollectionStream<Model extends BaseModel>(
String path, {
List<QueryType>? where,
Map<String, bool>? orderby,
int? limit,
}) {
var pathParam = path.split("/");
if (pathParam.length.isEven) {
throw GetCollectionGroupError(
"number of ids must be less than paths for subcollection",
StackTrace.current);
}
Query query = collectionPath(pathParam);
if (where != null) {
where = checkQueryConstructor(where);
}
var collection = queryConstruction(
query,
where: where,
orderby: orderby,
limit: limit,
);
Stream<QuerySnapshot> snapshots = collection.snapshots();
return snapshots.map((snapshot) => parser.parse<Model>(snapshot));
}