how can I do a filter on my jobs list in a stream I had a list of jobs in my ObjectBox db and I wanted to filter the stream list records according to my job type as per below code. I had search around for the function but never found 1 to work for my scenario. Any suggestion and solution are welcome and thanks in advance.
StreamController<List<Jobs>> streamController = BehaviorSubject();
Stream<List<Jobs>> populateJobs(String jType) {
return streamController.stream;
// .where((event) => event.
// .toList()
// .where((j) => j.transType.contains(TransTypeFilter)))
// .toList();
}
Searched from google and Stackoverflow as per above code. The result is to filter the list by a property call TransType in the objects.
You can use map+where.