Sounds like switchMap from your description, you basically switch to the other Stream, but when the first one emits again, it cancels and does the switch again with the newest value.
thanks for your suggestion that time, it hit the nail :)
in the meanwhile I was using rxdart for a lot of things, its really a great library!
I also like the BehaviorSubject
and make more and more use of it. Sometimes I want to 'upgrade' existing streams (I don't have control over) just to gain easy access to the last value.
I do this like this:
final gridSubject = BehaviorSubject<List<Grid>>();
gridStream.pipe(gridSubject);
I was wondering if this approach is suggested?
Hey everyone , I am running into a value error when passing the behavior subject. I am using the bloc pattern and my requirement here is to pass the stream from the repository layer to the ui layer. Also find attached a link to the minimal reproduction sample : https://github.com/Pranavvks/Ultimate-to-do-minimal-repd.
``` BehaviorSubject<DocumentSnapshot<Map<String, dynamic>>> getDailyTasks() {
var stream = db.collection("Daily_tasks").doc(user!.uid).snapshots();
(stream.listen((event) {
print(event.data());
}));
todoStreamController.sink.addStream(stream);
return todoStreamController;
```