QuerySnapshot<T extends Model> constructor
QuerySnapshot<T extends Model> ({
- required List<
T> items, - required bool isSynced,
- QueryPredicate<
Model> ? where, - List<
QuerySortBy> ? sortBy,
A snapshot consisting of the items
in the local store when the
snapshot was generated and a boolean value to indicate if
this model has finished syncing data over the network.
Implementation
factory QuerySnapshot({
required List<T> items,
required bool isSynced,
QueryPredicate? where,
List<QuerySortBy>? sortBy,
}) {
final sortedList = SortedList.fromPresortedList(
items: items,
compare: _createCompareFromSortBy(sortBy),
);
return QuerySnapshot._(
sortedList: sortedList,
isSynced: isSynced,
where: where,
sortBy: sortBy,
);
}