getChatsStream method

Stream<List<PeamanChat>> getChatsStream({
  1. MyQuery query(
    1. MyQuery
    )?,
})

Implementation

Stream<List<PeamanChat>> getChatsStream({
  final MyQuery Function(MyQuery)? query,
}) {
  final _ref = PeamanReferenceHelper.chatsCol
      .where('visibility', isEqualTo: true)
      .orderBy('updated_at', descending: true);
  final _query = query?.call(_ref) ?? _ref;
  return _query.snapshots().map(_chatsFromFirestore);
}