valuesWithDetails method

  1. @override
Stream<List<InviteDashboardModel?>> valuesWithDetails({
  1. String? orderBy,
  2. bool? descending,
  3. Object? startAfter,
  4. int? limit,
  5. SetLastDoc? setLastDoc,
  6. int? privilegeLevel,
  7. EliudQuery? eliudQuery,
})
override

Implementation

@override
Stream<List<InviteDashboardModel?>> valuesWithDetails(
    {String? orderBy,
    bool? descending,
    Object? startAfter,
    int? limit,
    SetLastDoc? setLastDoc,
    int? privilegeLevel,
    EliudQuery? eliudQuery}) {
  DocumentSnapshot? lastDoc;
  Stream<List<InviteDashboardModel?>> values = getQuery(
          inviteDashboardCollection,
          orderBy: orderBy,
          descending: descending,
          startAfter: startAfter as DocumentSnapshot?,
          limit: limit,
          privilegeLevel: privilegeLevel,
          eliudQuery: eliudQuery,
          appId: appId)!
      .snapshots()
      .asyncMap((snapshot) {
    return Future.wait(snapshot.docs.map((doc) {
      lastDoc = doc;
      return _populateDocPlus(doc);
    }).toList());
  });
  if ((setLastDoc != null) && (lastDoc != null)) setLastDoc(lastDoc);
  return values;
}