TrainingPage constructor

TrainingPage({
  1. Key? key,
  2. required DailyPlan dailyPlan,
  3. required bool haveOverviewPage,
  4. required void onFinish(),
  5. TrainingTheme theme = const TrainingTheme(),
})

Implementation

TrainingPage({
  Key? key,
  required DailyPlan dailyPlan,
  required bool haveOverviewPage,
  required this.onFinish,
  this.theme = const TrainingTheme(),
}) : super(key: key) {
  bloc = TrainingBloc(
      dailyPlan: dailyPlan,
      haveOverview: haveOverviewPage,
      trainingTheme: theme);
  if (haveOverviewPage) {
    bloc.add(ShowOverViewEvent());
  }
}