Answer the question
In order to leave comments, you need to log in
Event handling in flutter?
Good afternoon! Help with advice, I use RxDart and BLoC.
In bloc, my data is processed in a loop and events are sent in it:
final _controller = BehaviorSubject();
for(var item in items){
var data = [];
/* тут код */
_controller.add(State._status(SearchStatus.inProgress));
_controller.add(State._data(data));
}
Answer the question
In order to leave comments, you need to log in
The docs say: A special StreamController that captures the latest item that has been added to the controller , and emits that as the first item to any new listener.
Use ReplaySubject instead of BehaviorSubject
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question