snapshot static method
dynamic
snapshot({
- required String collectionName,
- List<
FireWhereField> ? where, - FireOrder? orderBy,
Implementation
static snapshot({
required String collectionName,
List<FireWhereField>? where,
FireOrder? orderBy,
}) {
var ref = getRef(
collectionName: collectionName,
where: where,
orderBy: orderBy,
);
try {
if (Platform.isWindows) {
return (ref as FireDartCollectionReference).stream;
} else {
return (ref as fs.CollectionReference).snapshots();
}
} on Exception catch (_) {
print(_);
}
}