TrainingBloc constructor
TrainingBloc({
- required DailyPlan dailyPlan,
- required bool haveOverview,
- required TrainingTheme trainingTheme,
Implementation
TrainingBloc({required this.dailyPlan, required this.haveOverview,required this.trainingTheme})
: super(InitState(dailyPlan: dailyPlan, haveOverview: haveOverview)) {
if (!haveOverview) {
currentState = TrainingStates.train;
}
on<ShowOverViewEvent>(_onShowOverviewEvent);
on<SetEvent>(_onSetEvent);
on<_ShowTrainEvent>(_onShowTrainEvent);
on<_ShowTestEvent>(_onShowTestEvent);
on<_ShowResultEvent>(_onShowResultEvent);
on<_ShowRestEvent>(_onShowRestEvent);
on<FinishEvent>(_onFinishEvent);
}