docs property
List<QueryDocumentSnapshot<T> >
get
docs
Returns the documents in this QuerySnapshot as a List in order of the query. Same as docs but typed as QueryDocumentSnapshot; this is the name used by the current official Firestore API.
The list cannot be modified, and each access builds a new list.
final List<String> names = snapshot.docs
.map((QueryDocumentSnapshot<Map<String, Object?>> doc) => doc.id)
.toList();
Implementation
List<QueryDocumentSnapshot<T>> get docs => toList(growable: false);