Is your feature request related to a problem? Please describe.
Currently it is not possible to configure how events are processed by the bloc. It is only possible to filter the incoming events but the way in which they are processed is fixed (asyncExpand
).
Describe the solution you'd like
transform
should be able to be overridden to control how/when events are processed by mapEventToState
.
switchMap
. @override
Stream<int> transform(events, next) {
return (events as Observable<Event>).switchMap(next);
}
@override
Stream<int> transform(events, next) {
return super.transform(
(events as Observable<Event>).distinct(),
next,
);
}
Both event filtering as well as processing should be able to be fully controlled/configured by developers while maintaining a consistent/safe default.
Additional context
Thanks to Cody and James for bringing this up 馃檹
Published the change in bloc 0.12.0
and flutter_bloc 0.11.0
馃帀
Most helpful comment
Published the change in
bloc 0.12.0
andflutter_bloc 0.11.0
馃帀