TrainingBloc constructor

TrainingBloc({
  1. required DailyPlan dailyPlan,
  2. required bool haveOverview,
  3. 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);

}