getFeedsBySearchKeywordStream method

Stream<List<PeamanFeed>> getFeedsBySearchKeywordStream({
  1. required String searchKeyword,
  2. MyQuery query(
    1. MyQuery
    )?,
})

Implementation

Stream<List<PeamanFeed>> getFeedsBySearchKeywordStream({
  required final String searchKeyword,
  final MyQuery Function(MyQuery)? query,
}) {
  final _ref = PeamanReferenceHelper.feedsCol
      .where('visibility', isEqualTo: true)
      .where('search_keys', arrayContains: searchKeyword);
  final _query = query?.call(_ref) ?? _ref;
  return _query.snapshots().map(_feedsFromFirebase);
}