DocumentsToQuerySnapshot<T> constructor
DocumentsToQuerySnapshot<T> (
- Iterable<
DocumentSnapshotPair< _snapshotsT> >
Implementation
DocumentsToQuerySnapshot(this._snapshots)
: docChanges = _snapshots.where((element) => element.old != null).map((e) {
return _DocumentChangesView<T>(
doc: e.current,
newIndex: e.current.exists ? 1 : 0,
oldIndex: e.old!.exists ? 1 : 0,
);
}).toList(),
docs = _snapshots.where((e) => e.current.exists).map((e) => _DocumentSnapshotAsQueryDocumentSnapshot(e.current)).toList(growable: false);