WT1.1.11 Null-Safe migration

This commit is contained in:
bossanyit
2021-04-02 11:42:26 +02:00
parent a656562c49
commit 01148c6e39
219 changed files with 3208 additions and 5334 deletions
@@ -14,16 +14,17 @@ part 'exercise_execute_plan_state.dart';
class ExerciseExecutePlanBloc extends Bloc<ExerciseExecutePlanEvent, ExerciseExecutePlanState> {
final WorkoutTreeRepository menuTreeRepository;
final ExercisePlanRepository exercisePlanRepository = ExercisePlanRepository();
int customerId;
int? customerId;
int selectedNumber = 0;
@override
ExerciseExecutePlanBloc({this.menuTreeRepository}) : super(ExerciseByPlanStateInitial());
ExerciseExecutePlanBloc({required this.menuTreeRepository}) : super(ExerciseByPlanStateInitial());
Future<void> getData() async {
exercisePlanRepository.setCustomerId(customerId);
exercisePlanRepository.setCustomerId(customerId!);
await exercisePlanRepository.getLastExercisePlan();
await exercisePlanRepository.getExercisePlanDetails();
menuTreeRepository.sortedTree = null;
menuTreeRepository.sortedTree.clear();
menuTreeRepository.sortByMuscleType();
menuTreeRepository.sortedTree.forEach((key, value) {
@@ -10,7 +10,7 @@ abstract class ExerciseExecutePlanEvent extends Equatable {
class AddExerciseByPlanEvent extends ExerciseExecutePlanEvent {
final ExerciseType exerciseType;
const AddExerciseByPlanEvent({this.exerciseType});
const AddExerciseByPlanEvent({required this.exerciseType});
@override
List<Object> get props => [exerciseType];
@@ -24,8 +24,8 @@ class ExerciseByPlanReady extends ExerciseExecutePlanState {
// error splash screen
class ExerciseByPlanError extends ExerciseExecutePlanState {
final String message;
const ExerciseByPlanError({this.message});
const ExerciseByPlanError({required this.message});
@override
List<Object> get props => [message];
}
}