Issue
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?
Solution
I think you are searching for generics. Here is a good starting point:
https://dart.dev/guides/language/language-tour#generics
Answered By - Ozan Taskiran Answer Checked By - Marilyn (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.