Skip to content

feat: Ability to apply a transformer to all events #3143

Description

@Amir-P

Description

Recently I started using bloc v8 and bloc_concurrency and I noticed that in this new version there is no way (or at least I couldn't find any way) to apply a transformer to all incoming events. Right now we can do something like this:

MyBloc(this.useCase) : super(const MyBlocState()) {
  on<Event1>(_event1);
  on<Event2>(_event2, transformer: debounced());
}

But what if we wanted to apply restartable transformer to all events?

Desired Solution

Ability to define global transformers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions