class MyBloc extends Bloc<MyEvent, MyState> {
MyBloc() : super(StateA()) {
on<EventA>((event, emit) => emit(StateA()));
on<EventB>((event, emit) => emit(StateB()));
}
}
How Bloc use <MyEvent, MyState>
under the hood?
CodePudding user response:
I think you are searching for generics. Here is a good starting point: