MainBloc constructor
MainBloc()
Implementation
MainBloc() : super(const MainState()) {
on<ChangeIndex>((event, emit) async {
emit(state.copyWith(selectIndex: event.index));
});
}
MainBloc() : super(const MainState()) {
on<ChangeIndex>((event, emit) async {
emit(state.copyWith(selectIndex: event.index));
});
}