From d8b7d452912645bbc19a6831d5b094993dea4cbe Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Wed, 10 Nov 2021 15:16:09 +0100 Subject: [PATCH] Upgrade dependencies and recreate generated files --- lib/models/body_weight/weight_entry.g.dart | 8 +- lib/models/exercises/category.g.dart | 8 +- lib/models/exercises/comment.g.dart | 5 +- lib/models/exercises/equipment.g.dart | 5 +- lib/models/exercises/exercise.g.dart | 35 +-- lib/models/exercises/image.g.dart | 8 +- lib/models/exercises/muscle.g.dart | 5 +- lib/models/gallery/image.g.dart | 5 +- .../measurements/measurement_category.g.dart | 9 +- .../measurements/measurement_entry.g.dart | 8 +- lib/models/nutrition/ingredient.g.dart | 32 ++- .../nutrition/ingredient_weight_unit.g.dart | 11 +- lib/models/nutrition/log.g.dart | 13 +- lib/models/nutrition/meal.g.dart | 12 +- lib/models/nutrition/meal_item.g.dart | 5 +- lib/models/nutrition/nutritional_plan.g.dart | 8 +- lib/models/nutrition/weight_unit.g.dart | 8 +- lib/models/workouts/day.g.dart | 5 +- lib/models/workouts/log.g.dart | 23 +- lib/models/workouts/repetition_unit.g.dart | 8 +- lib/models/workouts/session.g.dart | 16 +- lib/models/workouts/set.g.dart | 5 +- lib/models/workouts/setting.g.dart | 27 +- lib/models/workouts/weight_unit.g.dart | 8 +- lib/models/workouts/workout_plan.g.dart | 8 +- pubspec.lock | 41 +-- pubspec.yaml | 6 +- test/gallery/gallery_screen_test.mocks.dart | 74 +++--- ...surement_categories_screen_test.mocks.dart | 62 +++-- .../measurement_provider_test.mocks.dart | 45 ++-- .../nutritional_plan_form_test.mocks.dart | 121 +++++---- test/other/base_provider_test.mocks.dart | 70 +++-- test/workout/workout_form_test.mocks.dart | 249 ++++++++++-------- test/workout/workout_set_form_test.mocks.dart | 87 +++--- 34 files changed, 634 insertions(+), 406 deletions(-) diff --git a/lib/models/body_weight/weight_entry.g.dart b/lib/models/body_weight/weight_entry.g.dart index 98ab3eda..60ee02c9 100644 --- a/lib/models/body_weight/weight_entry.g.dart +++ b/lib/models/body_weight/weight_entry.g.dart @@ -7,7 +7,10 @@ part of 'weight_entry.dart'; // ************************************************************************** WeightEntry _$WeightEntryFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'weight', 'date']); + $checkKeys( + json, + requiredKeys: const ['id', 'weight', 'date'], + ); return WeightEntry( id: json['id'] as int?, weight: stringToNum(json['weight'] as String?), @@ -15,7 +18,8 @@ WeightEntry _$WeightEntryFromJson(Map json) { ); } -Map _$WeightEntryToJson(WeightEntry instance) => { +Map _$WeightEntryToJson(WeightEntry instance) => + { 'id': instance.id, 'weight': numToString(instance.weight), 'date': toDate(instance.date), diff --git a/lib/models/exercises/category.g.dart b/lib/models/exercises/category.g.dart index 5083051f..19383107 100644 --- a/lib/models/exercises/category.g.dart +++ b/lib/models/exercises/category.g.dart @@ -7,14 +7,18 @@ part of 'category.dart'; // ************************************************************************** ExerciseCategory _$ExerciseCategoryFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'name']); + $checkKeys( + json, + requiredKeys: const ['id', 'name'], + ); return ExerciseCategory( id: json['id'] as int, name: json['name'] as String, ); } -Map _$ExerciseCategoryToJson(ExerciseCategory instance) => { +Map _$ExerciseCategoryToJson(ExerciseCategory instance) => + { 'id': instance.id, 'name': instance.name, }; diff --git a/lib/models/exercises/comment.g.dart b/lib/models/exercises/comment.g.dart index 6195a276..179ef89b 100644 --- a/lib/models/exercises/comment.g.dart +++ b/lib/models/exercises/comment.g.dart @@ -7,7 +7,10 @@ part of 'comment.dart'; // ************************************************************************** Comment _$CommentFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'comment']); + $checkKeys( + json, + requiredKeys: const ['id', 'comment'], + ); return Comment( id: json['id'] as int, comment: json['comment'] as String, diff --git a/lib/models/exercises/equipment.g.dart b/lib/models/exercises/equipment.g.dart index 252f0397..3948e1bb 100644 --- a/lib/models/exercises/equipment.g.dart +++ b/lib/models/exercises/equipment.g.dart @@ -7,7 +7,10 @@ part of 'equipment.dart'; // ************************************************************************** Equipment _$EquipmentFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'name']); + $checkKeys( + json, + requiredKeys: const ['id', 'name'], + ); return Equipment( id: json['id'] as int, name: json['name'] as String, diff --git a/lib/models/exercises/exercise.g.dart b/lib/models/exercises/exercise.g.dart index 4c449343..44575077 100644 --- a/lib/models/exercises/exercise.g.dart +++ b/lib/models/exercises/exercise.g.dart @@ -7,19 +7,22 @@ part of 'exercise.dart'; // ************************************************************************** Exercise _$ExerciseFromJson(Map json) { - $checkKeys(json, requiredKeys: const [ - 'id', - 'uuid', - 'creation_date', - 'name', - 'description', - 'category', - 'muscles', - 'muscles_secondary', - 'equipment', - 'images', - 'comments' - ]); + $checkKeys( + json, + requiredKeys: const [ + 'id', + 'uuid', + 'creation_date', + 'name', + 'description', + 'category', + 'muscles', + 'muscles_secondary', + 'equipment', + 'images', + 'comments' + ], + ); return Exercise( id: json['id'] as int, uuid: json['uuid'] as String, @@ -41,7 +44,8 @@ Exercise _$ExerciseFromJson(Map json) { tips: (json['comments'] as List?) ?.map((e) => Comment.fromJson(e as Map)) .toList(), - )..categoryObj = ExerciseCategory.fromJson(json['category'] as Map); + )..categoryObj = + ExerciseCategory.fromJson(json['category'] as Map); } Map _$ExerciseToJson(Exercise instance) => { @@ -52,7 +56,8 @@ Map _$ExerciseToJson(Exercise instance) => { 'description': instance.description, 'category': instance.categoryObj.toJson(), 'muscles': instance.muscles.map((e) => e.toJson()).toList(), - 'muscles_secondary': instance.musclesSecondary.map((e) => e.toJson()).toList(), + 'muscles_secondary': + instance.musclesSecondary.map((e) => e.toJson()).toList(), 'equipment': instance.equipment.map((e) => e.toJson()).toList(), 'images': instance.images.map((e) => e.toJson()).toList(), 'comments': instance.tips.map((e) => e.toJson()).toList(), diff --git a/lib/models/exercises/image.g.dart b/lib/models/exercises/image.g.dart index c55b4029..1240dc38 100644 --- a/lib/models/exercises/image.g.dart +++ b/lib/models/exercises/image.g.dart @@ -7,7 +7,10 @@ part of 'image.dart'; // ************************************************************************** ExerciseImage _$ExerciseImageFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'uuid', 'exercise_base', 'image']); + $checkKeys( + json, + requiredKeys: const ['id', 'uuid', 'exercise_base', 'image'], + ); return ExerciseImage( id: json['id'] as int, uuid: json['uuid'] as String, @@ -17,7 +20,8 @@ ExerciseImage _$ExerciseImageFromJson(Map json) { ); } -Map _$ExerciseImageToJson(ExerciseImage instance) => { +Map _$ExerciseImageToJson(ExerciseImage instance) => + { 'id': instance.id, 'uuid': instance.uuid, 'exercise_base': instance.exerciseBaseId, diff --git a/lib/models/exercises/muscle.g.dart b/lib/models/exercises/muscle.g.dart index 41820a7f..89bcb1ab 100644 --- a/lib/models/exercises/muscle.g.dart +++ b/lib/models/exercises/muscle.g.dart @@ -7,7 +7,10 @@ part of 'muscle.dart'; // ************************************************************************** Muscle _$MuscleFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'name', 'is_front']); + $checkKeys( + json, + requiredKeys: const ['id', 'name', 'is_front'], + ); return Muscle( id: json['id'] as int, name: json['name'] as String, diff --git a/lib/models/gallery/image.g.dart b/lib/models/gallery/image.g.dart index 98ad831b..d87cc4e4 100644 --- a/lib/models/gallery/image.g.dart +++ b/lib/models/gallery/image.g.dart @@ -7,7 +7,10 @@ part of 'image.dart'; // ************************************************************************** Image _$ImageFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'date', 'image']); + $checkKeys( + json, + requiredKeys: const ['id', 'date', 'image'], + ); return Image( id: json['id'] as int?, date: DateTime.parse(json['date'] as String), diff --git a/lib/models/measurements/measurement_category.g.dart b/lib/models/measurements/measurement_category.g.dart index 8c5b6538..ef4ebcd3 100644 --- a/lib/models/measurements/measurement_category.g.dart +++ b/lib/models/measurements/measurement_category.g.dart @@ -7,7 +7,10 @@ part of 'measurement_category.dart'; // ************************************************************************** MeasurementCategory _$MeasurementCategoryFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'name', 'unit']); + $checkKeys( + json, + requiredKeys: const ['id', 'name', 'unit'], + ); return MeasurementCategory( id: json['id'] as int?, name: json['name'] as String, @@ -19,7 +22,9 @@ MeasurementCategory _$MeasurementCategoryFromJson(Map json) { ); } -Map _$MeasurementCategoryToJson(MeasurementCategory instance) => { +Map _$MeasurementCategoryToJson( + MeasurementCategory instance) => + { 'id': instance.id, 'name': instance.name, 'unit': instance.unit, diff --git a/lib/models/measurements/measurement_entry.g.dart b/lib/models/measurements/measurement_entry.g.dart index 76964759..4b096960 100644 --- a/lib/models/measurements/measurement_entry.g.dart +++ b/lib/models/measurements/measurement_entry.g.dart @@ -7,7 +7,10 @@ part of 'measurement_entry.dart'; // ************************************************************************** MeasurementEntry _$MeasurementEntryFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'category', 'date', 'value', 'notes']); + $checkKeys( + json, + requiredKeys: const ['id', 'category', 'date', 'value', 'notes'], + ); return MeasurementEntry( id: json['id'] as int?, category: json['category'] as int, @@ -17,7 +20,8 @@ MeasurementEntry _$MeasurementEntryFromJson(Map json) { ); } -Map _$MeasurementEntryToJson(MeasurementEntry instance) => { +Map _$MeasurementEntryToJson(MeasurementEntry instance) => + { 'id': instance.id, 'category': instance.category, 'date': toDate(instance.date), diff --git a/lib/models/nutrition/ingredient.g.dart b/lib/models/nutrition/ingredient.g.dart index 6ffb0a9c..e5859dda 100644 --- a/lib/models/nutrition/ingredient.g.dart +++ b/lib/models/nutrition/ingredient.g.dart @@ -7,19 +7,22 @@ part of 'ingredient.dart'; // ************************************************************************** Ingredient _$IngredientFromJson(Map json) { - $checkKeys(json, requiredKeys: const [ - 'id', - 'name', - 'creation_date', - 'energy', - 'carbohydrates', - 'carbohydrates_sugar', - 'protein', - 'fat', - 'fat_saturated', - 'fibres', - 'sodium' - ]); + $checkKeys( + json, + requiredKeys: const [ + 'id', + 'name', + 'creation_date', + 'energy', + 'carbohydrates', + 'carbohydrates_sugar', + 'protein', + 'fat', + 'fat_saturated', + 'fibres', + 'sodium' + ], + ); return Ingredient( id: json['id'] as int, name: json['name'] as String, @@ -35,7 +38,8 @@ Ingredient _$IngredientFromJson(Map json) { ); } -Map _$IngredientToJson(Ingredient instance) => { +Map _$IngredientToJson(Ingredient instance) => + { 'id': instance.id, 'name': instance.name, 'creation_date': toDate(instance.creationDate), diff --git a/lib/models/nutrition/ingredient_weight_unit.g.dart b/lib/models/nutrition/ingredient_weight_unit.g.dart index 600d0ed4..74b1f101 100644 --- a/lib/models/nutrition/ingredient_weight_unit.g.dart +++ b/lib/models/nutrition/ingredient_weight_unit.g.dart @@ -7,17 +7,22 @@ part of 'ingredient_weight_unit.dart'; // ************************************************************************** IngredientWeightUnit _$IngredientWeightUnitFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'weight_unit', 'ingredient', 'grams', 'amount']); + $checkKeys( + json, + requiredKeys: const ['id', 'weight_unit', 'ingredient', 'grams', 'amount'], + ); return IngredientWeightUnit( id: json['id'] as int, - weightUnit: WeightUnit.fromJson(json['weight_unit'] as Map), + weightUnit: + WeightUnit.fromJson(json['weight_unit'] as Map), ingredient: Ingredient.fromJson(json['ingredient'] as Map), grams: json['grams'] as int, amount: (json['amount'] as num).toDouble(), ); } -Map _$IngredientWeightUnitToJson(IngredientWeightUnit instance) => +Map _$IngredientWeightUnitToJson( + IngredientWeightUnit instance) => { 'id': instance.id, 'weight_unit': instance.weightUnit, diff --git a/lib/models/nutrition/log.g.dart b/lib/models/nutrition/log.g.dart index 72c3f639..39068768 100644 --- a/lib/models/nutrition/log.g.dart +++ b/lib/models/nutrition/log.g.dart @@ -7,8 +7,17 @@ part of 'log.dart'; // ************************************************************************** Log _$LogFromJson(Map json) { - $checkKeys(json, - requiredKeys: const ['id', 'plan', 'datetime', 'ingredient', 'weight_unit', 'amount']); + $checkKeys( + json, + requiredKeys: const [ + 'id', + 'plan', + 'datetime', + 'ingredient', + 'weight_unit', + 'amount' + ], + ); return Log( id: json['id'] as int?, mealId: json['meal'] as int?, diff --git a/lib/models/nutrition/meal.g.dart b/lib/models/nutrition/meal.g.dart index 3d079787..296d637e 100644 --- a/lib/models/nutrition/meal.g.dart +++ b/lib/models/nutrition/meal.g.dart @@ -6,13 +6,11 @@ part of 'meal.dart'; // JsonSerializableGenerator // ************************************************************************** -Meal _$MealFromJson(Map json) { - return Meal( - id: json['id'] as int?, - time: stringToTime(json['time'] as String?), - name: json['name'] as String?, - )..planId = json['plan'] as int; -} +Meal _$MealFromJson(Map json) => Meal( + id: json['id'] as int?, + time: stringToTime(json['time'] as String?), + name: json['name'] as String?, + )..planId = json['plan'] as int; Map _$MealToJson(Meal instance) => { 'id': instance.id, diff --git a/lib/models/nutrition/meal_item.g.dart b/lib/models/nutrition/meal_item.g.dart index e0af0526..514788cc 100644 --- a/lib/models/nutrition/meal_item.g.dart +++ b/lib/models/nutrition/meal_item.g.dart @@ -7,7 +7,10 @@ part of 'meal_item.dart'; // ************************************************************************** MealItem _$MealItemFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'amount']); + $checkKeys( + json, + requiredKeys: const ['id', 'amount'], + ); return MealItem( id: json['id'] as int?, mealId: json['meal'] as int?, diff --git a/lib/models/nutrition/nutritional_plan.g.dart b/lib/models/nutrition/nutritional_plan.g.dart index 024e87db..9b10d8a5 100644 --- a/lib/models/nutrition/nutritional_plan.g.dart +++ b/lib/models/nutrition/nutritional_plan.g.dart @@ -7,7 +7,10 @@ part of 'nutritional_plan.dart'; // ************************************************************************** NutritionalPlan _$NutritionalPlanFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'description', 'creation_date']); + $checkKeys( + json, + requiredKeys: const ['id', 'description', 'creation_date'], + ); return NutritionalPlan( id: json['id'] as int?, description: json['description'] as String, @@ -15,7 +18,8 @@ NutritionalPlan _$NutritionalPlanFromJson(Map json) { ); } -Map _$NutritionalPlanToJson(NutritionalPlan instance) => { +Map _$NutritionalPlanToJson(NutritionalPlan instance) => + { 'id': instance.id, 'description': instance.description, 'creation_date': toDate(instance.creationDate), diff --git a/lib/models/nutrition/weight_unit.g.dart b/lib/models/nutrition/weight_unit.g.dart index b8a01b2b..74e1f0cf 100644 --- a/lib/models/nutrition/weight_unit.g.dart +++ b/lib/models/nutrition/weight_unit.g.dart @@ -7,14 +7,18 @@ part of 'weight_unit.dart'; // ************************************************************************** WeightUnit _$WeightUnitFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'name']); + $checkKeys( + json, + requiredKeys: const ['id', 'name'], + ); return WeightUnit( id: json['id'] as int, name: json['name'] as String, ); } -Map _$WeightUnitToJson(WeightUnit instance) => { +Map _$WeightUnitToJson(WeightUnit instance) => + { 'id': instance.id, 'name': instance.name, }; diff --git a/lib/models/workouts/day.g.dart b/lib/models/workouts/day.g.dart index 6ab6e972..0f1b6736 100644 --- a/lib/models/workouts/day.g.dart +++ b/lib/models/workouts/day.g.dart @@ -7,7 +7,10 @@ part of 'day.dart'; // ************************************************************************** Day _$DayFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'training', 'description', 'day']); + $checkKeys( + json, + requiredKeys: const ['id', 'training', 'description', 'day'], + ); return Day() ..id = json['id'] as int? ..workoutId = json['training'] as int diff --git a/lib/models/workouts/log.g.dart b/lib/models/workouts/log.g.dart index c9717af3..cb2815e3 100644 --- a/lib/models/workouts/log.g.dart +++ b/lib/models/workouts/log.g.dart @@ -7,16 +7,19 @@ part of 'log.dart'; // ************************************************************************** Log _$LogFromJson(Map json) { - $checkKeys(json, requiredKeys: const [ - 'id', - 'exercise', - 'workout', - 'reps', - 'repetition_unit', - 'weight', - 'weight_unit', - 'date' - ]); + $checkKeys( + json, + requiredKeys: const [ + 'id', + 'exercise', + 'workout', + 'reps', + 'repetition_unit', + 'weight', + 'weight_unit', + 'date' + ], + ); return Log( id: json['id'] as int?, exerciseId: json['exercise'] as int, diff --git a/lib/models/workouts/repetition_unit.g.dart b/lib/models/workouts/repetition_unit.g.dart index 40829256..115dc338 100644 --- a/lib/models/workouts/repetition_unit.g.dart +++ b/lib/models/workouts/repetition_unit.g.dart @@ -7,14 +7,18 @@ part of 'repetition_unit.dart'; // ************************************************************************** RepetitionUnit _$RepetitionUnitFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'name']); + $checkKeys( + json, + requiredKeys: const ['id', 'name'], + ); return RepetitionUnit( id: json['id'] as int, name: json['name'] as String, ); } -Map _$RepetitionUnitToJson(RepetitionUnit instance) => { +Map _$RepetitionUnitToJson(RepetitionUnit instance) => + { 'id': instance.id, 'name': instance.name, }; diff --git a/lib/models/workouts/session.g.dart b/lib/models/workouts/session.g.dart index b00ec0c2..e16affad 100644 --- a/lib/models/workouts/session.g.dart +++ b/lib/models/workouts/session.g.dart @@ -7,8 +7,17 @@ part of 'session.dart'; // ************************************************************************** WorkoutSession _$WorkoutSessionFromJson(Map json) { - $checkKeys(json, - requiredKeys: const ['id', 'workout', 'date', 'impression', 'time_start', 'time_end']); + $checkKeys( + json, + requiredKeys: const [ + 'id', + 'workout', + 'date', + 'impression', + 'time_start', + 'time_end' + ], + ); return WorkoutSession() ..id = json['id'] as int? ..workoutId = json['workout'] as int @@ -19,7 +28,8 @@ WorkoutSession _$WorkoutSessionFromJson(Map json) { ..timeEnd = stringToTime(json['time_end'] as String?); } -Map _$WorkoutSessionToJson(WorkoutSession instance) => { +Map _$WorkoutSessionToJson(WorkoutSession instance) => + { 'id': instance.id, 'workout': instance.workoutId, 'date': toDate(instance.date), diff --git a/lib/models/workouts/set.g.dart b/lib/models/workouts/set.g.dart index 9c6f83e2..2548fc12 100644 --- a/lib/models/workouts/set.g.dart +++ b/lib/models/workouts/set.g.dart @@ -7,7 +7,10 @@ part of 'set.dart'; // ************************************************************************** Set _$SetFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'sets', 'order', 'comment']); + $checkKeys( + json, + requiredKeys: const ['id', 'sets', 'order', 'comment'], + ); return Set( day: json['exerciseday'] as int, sets: json['sets'] as int, diff --git a/lib/models/workouts/setting.g.dart b/lib/models/workouts/setting.g.dart index d99751fa..05715589 100644 --- a/lib/models/workouts/setting.g.dart +++ b/lib/models/workouts/setting.g.dart @@ -7,18 +7,21 @@ part of 'setting.dart'; // ************************************************************************** Setting _$SettingFromJson(Map json) { - $checkKeys(json, requiredKeys: const [ - 'id', - 'set', - 'order', - 'exercise', - 'repetition_unit', - 'reps', - 'weight', - 'weight_unit', - 'comment', - 'rir' - ]); + $checkKeys( + json, + requiredKeys: const [ + 'id', + 'set', + 'order', + 'exercise', + 'repetition_unit', + 'reps', + 'weight', + 'weight_unit', + 'comment', + 'rir' + ], + ); return Setting( id: json['id'] as int?, setId: json['set'] as int, diff --git a/lib/models/workouts/weight_unit.g.dart b/lib/models/workouts/weight_unit.g.dart index b8a01b2b..74e1f0cf 100644 --- a/lib/models/workouts/weight_unit.g.dart +++ b/lib/models/workouts/weight_unit.g.dart @@ -7,14 +7,18 @@ part of 'weight_unit.dart'; // ************************************************************************** WeightUnit _$WeightUnitFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'name']); + $checkKeys( + json, + requiredKeys: const ['id', 'name'], + ); return WeightUnit( id: json['id'] as int, name: json['name'] as String, ); } -Map _$WeightUnitToJson(WeightUnit instance) => { +Map _$WeightUnitToJson(WeightUnit instance) => + { 'id': instance.id, 'name': instance.name, }; diff --git a/lib/models/workouts/workout_plan.g.dart b/lib/models/workouts/workout_plan.g.dart index 0a1dfb0a..ef156e3e 100644 --- a/lib/models/workouts/workout_plan.g.dart +++ b/lib/models/workouts/workout_plan.g.dart @@ -7,7 +7,10 @@ part of 'workout_plan.dart'; // ************************************************************************** WorkoutPlan _$WorkoutPlanFromJson(Map json) { - $checkKeys(json, requiredKeys: const ['id', 'creation_date', 'name', 'description']); + $checkKeys( + json, + requiredKeys: const ['id', 'creation_date', 'name', 'description'], + ); return WorkoutPlan( id: json['id'] as int?, creationDate: DateTime.parse(json['creation_date'] as String), @@ -16,7 +19,8 @@ WorkoutPlan _$WorkoutPlanFromJson(Map json) { ); } -Map _$WorkoutPlanToJson(WorkoutPlan instance) => { +Map _$WorkoutPlanToJson(WorkoutPlan instance) => + { 'id': instance.id, 'creation_date': instance.creationDate.toIso8601String(), 'name': instance.name, diff --git a/pubspec.lock b/pubspec.lock index cd1ac129..d179f097 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "22.0.0" + version: "30.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.7.2" + version: "2.7.0" android_metadata: dependency: "direct main" description: @@ -84,7 +84,7 @@ packages: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.5" build_runner_core: dependency: transitive description: @@ -175,7 +175,7 @@ packages: name: chewie url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "1.1.0" chewie_audio: dependency: transitive description: @@ -252,14 +252,14 @@ packages: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.0.4" dart_style: dependency: transitive description: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.2.0" equatable: dependency: "direct main" description: @@ -367,7 +367,7 @@ packages: name: flutter_math_fork url: "https://pub.dartlang.org" source: hosted - version: "0.3.3+1" + version: "0.5.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -381,7 +381,7 @@ packages: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "0.22.0" + version: "0.23.0+1" flutter_test: dependency: "direct dev" description: flutter @@ -510,14 +510,14 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.1.0" + version: "4.3.0" json_serializable: dependency: "direct dev" description: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "4.1.4" + version: "6.0.1" klizma: dependency: transitive description: @@ -580,7 +580,7 @@ packages: name: mockito url: "https://pub.dartlang.org" source: hosted - version: "5.0.15" + version: "5.0.16" nested: dependency: transitive description: @@ -706,7 +706,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "6.0.1" pub_semver: dependency: transitive description: @@ -816,7 +816,14 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.1.1" + source_helper: + dependency: transitive + description: + name: source_helper + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" source_span: dependency: transitive description: @@ -963,7 +970,7 @@ packages: name: video_player url: "https://pub.dartlang.org" source: hosted - version: "2.2.6" + version: "2.2.7" video_player_platform_interface: dependency: transitive description: @@ -1033,21 +1040,21 @@ packages: name: webview_flutter url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.3.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.4.0" webview_flutter_wkwebview: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a521352d..5551bdb7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -44,10 +44,10 @@ dependencies: http: ^0.13.3 image_picker: ^0.8.4+1 intl: ^0.17.0 - json_annotation: ^4.0.1 + json_annotation: ^4.3.0 version: ^2.0.0 package_info: ^2.0.2 - provider: ^5.0.0 + provider: ^6.0.1 rive: ^0.7.33 shared_preferences: ^2.0.7 table_calendar: ^3.0.2 @@ -60,7 +60,7 @@ dev_dependencies: # sdk: flutter build_runner: ^2.1.2 flutter_launcher_icons: ^0.9.1 - json_serializable: ^4.1.4 + json_serializable: ^6.0.1 mockito: ^5.0.15 network_image_mock: ^2.0.1 flutter_lints: ^1.0.4 diff --git a/test/gallery/gallery_screen_test.mocks.dart b/test/gallery/gallery_screen_test.mocks.dart index b7864a90..1490b2f8 100644 --- a/test/gallery/gallery_screen_test.mocks.dart +++ b/test/gallery/gallery_screen_test.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.0.15 from annotations -// in wger/test/gallery_screen_test.dart. +// Mocks generated by Mockito 5.0.16 from annotations +// in wger/test/gallery/gallery_screen_test.dart. // Do not manually edit this file. import 'dart:async' as _i6; @@ -19,6 +19,7 @@ import 'package:wger/providers/gallery.dart' as _i4; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types class _FakeAuthProvider_0 extends _i1.Fake implements _i2.AuthProvider {} @@ -37,31 +38,33 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { } @override - List<_i5.Image> get images => - (super.noSuchMethod(Invocation.getter(#images), returnValue: <_i5.Image>[]) - as List<_i5.Image>); + List<_i5.Image> get images => (super.noSuchMethod(Invocation.getter(#images), + returnValue: <_i5.Image>[]) as List<_i5.Image>); @override set images(List<_i5.Image>? _images) => - super.noSuchMethod(Invocation.setter(#images, _images), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#images, _images), + returnValueForMissingStub: null); @override - _i2.AuthProvider get auth => - (super.noSuchMethod(Invocation.getter(#auth), returnValue: _FakeAuthProvider_0()) - as _i2.AuthProvider); + _i2.AuthProvider get auth => (super.noSuchMethod(Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0()) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#auth, _auth), + returnValueForMissingStub: null); @override - _i3.Client get client => - (super.noSuchMethod(Invocation.getter(#client), returnValue: _FakeClient_1()) as _i3.Client); + _i3.Client get client => (super.noSuchMethod(Invocation.getter(#client), + returnValue: _FakeClient_1()) as _i3.Client); @override set client(_i3.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#client, _client), + returnValueForMissingStub: null); @override bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - void clear() => - super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); + void clear() => super.noSuchMethod(Invocation.method(#clear, []), + returnValueForMissingStub: null); @override _i6.Future fetchAndSetGallery() => (super.noSuchMethod(Invocation.method(#fetchAndSetGallery, []), @@ -83,43 +86,50 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i6.Future); @override - Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + Uri makeUrl(String? path, + {int? id, String? objectMethod, Map? query}) => (super.noSuchMethod( - Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), + Invocation.method(#makeUrl, [path], + {#id: id, #objectMethod: objectMethod, #query: query}), returnValue: _FakeUri_2()) as Uri); @override - _i6.Future> fetch(Uri? uri) => - (super.noSuchMethod(Invocation.method(#fetch, [uri]), - returnValue: Future>.value({})) - as _i6.Future>); + _i6.Future> fetch(Uri? uri) => (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: Future>.value({})) + as _i6.Future>); @override _i6.Future> post(Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i6.Future>); @override - _i6.Future> patch(Map? data, Uri? uri) => + _i6.Future> patch( + Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i6.Future>); @override _i6.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod(Invocation.method(#deleteRequest, [url, id]), - returnValue: Future<_i3.Response>.value(_FakeResponse_3())) as _i6.Future<_i3.Response>); + returnValue: Future<_i3.Response>.value(_FakeResponse_3())) + as _i6.Future<_i3.Response>); @override String toString() => super.toString(); @override - void addListener(_i8.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); + void addListener(_i8.VoidCallback? listener) => + super.noSuchMethod(Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override - void dispose() => - super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); + void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), + returnValueForMissingStub: null); @override void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null); } diff --git a/test/measurements/measurement_categories_screen_test.mocks.dart b/test/measurements/measurement_categories_screen_test.mocks.dart index bc5f90a5..44427afa 100644 --- a/test/measurements/measurement_categories_screen_test.mocks.dart +++ b/test/measurements/measurement_categories_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.0.16 from annotations // in wger/test/measurements/measurement_categories_screen_test.dart. // Do not manually edit this file. @@ -18,37 +18,43 @@ import 'package:wger/providers/measurement.dart' as _i4; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types -class _FakeWgerBaseProvider_0 extends _i1.Fake implements _i2.WgerBaseProvider {} +class _FakeWgerBaseProvider_0 extends _i1.Fake implements _i2.WgerBaseProvider { +} -class _FakeMeasurementCategory_1 extends _i1.Fake implements _i3.MeasurementCategory {} +class _FakeMeasurementCategory_1 extends _i1.Fake + implements _i3.MeasurementCategory {} /// A class which mocks [MeasurementProvider]. /// /// See the documentation for Mockito's code generation for more information. -class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvider { +class MockMeasurementProvider extends _i1.Mock + implements _i4.MeasurementProvider { MockMeasurementProvider() { _i1.throwOnMissingStub(this); } @override _i2.WgerBaseProvider get baseProvider => - (super.noSuchMethod(Invocation.getter(#baseProvider), returnValue: _FakeWgerBaseProvider_0()) - as _i2.WgerBaseProvider); + (super.noSuchMethod(Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0()) as _i2.WgerBaseProvider); @override List<_i3.MeasurementCategory> get categories => - (super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i3.MeasurementCategory>[]) + (super.noSuchMethod(Invocation.getter(#categories), + returnValue: <_i3.MeasurementCategory>[]) as List<_i3.MeasurementCategory>); @override bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - void clear() => - super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); + void clear() => super.noSuchMethod(Invocation.method(#clear, []), + returnValueForMissingStub: null); @override - _i3.MeasurementCategory findCategoryById(int? id) => - (super.noSuchMethod(Invocation.method(#findCategoryById, [id]), - returnValue: _FakeMeasurementCategory_1()) as _i3.MeasurementCategory); + _i3.MeasurementCategory findCategoryById(int? id) => (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeMeasurementCategory_1()) as _i3.MeasurementCategory); @override _i5.Future fetchAndSetCategories() => (super.noSuchMethod(Invocation.method(#fetchAndSetCategories, []), @@ -60,10 +66,10 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i5.Future fetchAndSetAllCategoriesAndEntries() => - (super.noSuchMethod(Invocation.method(#fetchAndSetAllCategoriesAndEntries, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + _i5.Future fetchAndSetAllCategoriesAndEntries() => (super.noSuchMethod( + Invocation.method(#fetchAndSetAllCategoriesAndEntries, []), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i5.Future); @override _i5.Future addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod(Invocation.method(#addCategory, [category]), @@ -76,7 +82,8 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide returnValueForMissingStub: Future.value()) as _i5.Future); @override _i5.Future editCategory(int? id, String? newName, String? newUnit) => - (super.noSuchMethod(Invocation.method(#editCategory, [id, newName, newUnit]), + (super.noSuchMethod( + Invocation.method(#editCategory, [id, newName, newUnit]), returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i5.Future); @override @@ -90,25 +97,28 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i5.Future editEntry( - int? id, int? categoryId, num? newValue, String? newNotes, DateTime? newDate) => + _i5.Future editEntry(int? id, int? categoryId, num? newValue, + String? newNotes, DateTime? newDate) => (super.noSuchMethod( - Invocation.method(#editEntry, [id, categoryId, newValue, newNotes, newDate]), + Invocation.method( + #editEntry, [id, categoryId, newValue, newNotes, newDate]), returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i5.Future); @override String toString() => super.toString(); @override - void addListener(_i7.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); + void addListener(_i7.VoidCallback? listener) => + super.noSuchMethod(Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override - void dispose() => - super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); + void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), + returnValueForMissingStub: null); @override void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null); } diff --git a/test/measurements/measurement_provider_test.mocks.dart b/test/measurements/measurement_provider_test.mocks.dart index 3d0ae4e9..1f87fba2 100644 --- a/test/measurements/measurement_provider_test.mocks.dart +++ b/test/measurements/measurement_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.0.16 from annotations // in wger/test/measurements/measurement_provider_test.dart. // Do not manually edit this file. @@ -16,6 +16,7 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types class _FakeAuthProvider_0 extends _i1.Fake implements _i2.AuthProvider {} @@ -34,43 +35,49 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => - (super.noSuchMethod(Invocation.getter(#auth), returnValue: _FakeAuthProvider_0()) - as _i2.AuthProvider); + _i2.AuthProvider get auth => (super.noSuchMethod(Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0()) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#auth, _auth), + returnValueForMissingStub: null); @override - _i3.Client get client => - (super.noSuchMethod(Invocation.getter(#client), returnValue: _FakeClient_1()) as _i3.Client); + _i3.Client get client => (super.noSuchMethod(Invocation.getter(#client), + returnValue: _FakeClient_1()) as _i3.Client); @override set client(_i3.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#client, _client), + returnValueForMissingStub: null); @override - Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + Uri makeUrl(String? path, + {int? id, String? objectMethod, Map? query}) => (super.noSuchMethod( - Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), + Invocation.method(#makeUrl, [path], + {#id: id, #objectMethod: objectMethod, #query: query}), returnValue: _FakeUri_2()) as Uri); @override - _i5.Future> fetch(Uri? uri) => - (super.noSuchMethod(Invocation.method(#fetch, [uri]), - returnValue: Future>.value({})) - as _i5.Future>); + _i5.Future> fetch(Uri? uri) => (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: Future>.value({})) + as _i5.Future>); @override _i5.Future> post(Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i5.Future>); @override - _i5.Future> patch(Map? data, Uri? uri) => + _i5.Future> patch( + Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i5.Future>); @override _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod(Invocation.method(#deleteRequest, [url, id]), - returnValue: Future<_i3.Response>.value(_FakeResponse_3())) as _i5.Future<_i3.Response>); + returnValue: Future<_i3.Response>.value(_FakeResponse_3())) + as _i5.Future<_i3.Response>); @override String toString() => super.toString(); } diff --git a/test/nutrition/nutritional_plan_form_test.mocks.dart b/test/nutrition/nutritional_plan_form_test.mocks.dart index a878141a..b2b8f158 100644 --- a/test/nutrition/nutritional_plan_form_test.mocks.dart +++ b/test/nutrition/nutritional_plan_form_test.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.0.15 from annotations -// in wger/test/nutritional_plan_form_test.dart. +// Mocks generated by Mockito 5.0.16 from annotations +// in wger/test/nutrition/nutritional_plan_form_test.dart. // Do not manually edit this file. import 'dart:async' as _i9; @@ -21,6 +21,7 @@ import 'package:wger/providers/nutrition.dart' as _i8; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types class _FakeAuthProvider_0 extends _i1.Fake implements _i2.AuthProvider {} @@ -41,38 +42,41 @@ class _FakeResponse_7 extends _i1.Fake implements _i3.Response {} /// A class which mocks [NutritionPlansProvider]. /// /// See the documentation for Mockito's code generation for more information. -class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansProvider { +class MockNutritionPlansProvider extends _i1.Mock + implements _i8.NutritionPlansProvider { MockNutritionPlansProvider() { _i1.throwOnMissingStub(this); } @override List<_i4.NutritionalPlan> get items => - (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i4.NutritionalPlan>[]) - as List<_i4.NutritionalPlan>); + (super.noSuchMethod(Invocation.getter(#items), + returnValue: <_i4.NutritionalPlan>[]) as List<_i4.NutritionalPlan>); @override - _i2.AuthProvider get auth => - (super.noSuchMethod(Invocation.getter(#auth), returnValue: _FakeAuthProvider_0()) - as _i2.AuthProvider); + _i2.AuthProvider get auth => (super.noSuchMethod(Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0()) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#auth, _auth), + returnValueForMissingStub: null); @override - _i3.Client get client => - (super.noSuchMethod(Invocation.getter(#client), returnValue: _FakeClient_1()) as _i3.Client); + _i3.Client get client => (super.noSuchMethod(Invocation.getter(#client), + returnValue: _FakeClient_1()) as _i3.Client); @override set client(_i3.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#client, _client), + returnValueForMissingStub: null); @override bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - void clear() => - super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); + void clear() => super.noSuchMethod(Invocation.method(#clear, []), + returnValueForMissingStub: null); @override _i4.NutritionalPlan findById(int? id) => - (super.noSuchMethod(Invocation.method(#findById, [id]), returnValue: _FakeNutritionalPlan_2()) - as _i4.NutritionalPlan); + (super.noSuchMethod(Invocation.method(#findById, [id]), + returnValue: _FakeNutritionalPlan_2()) as _i4.NutritionalPlan); @override _i5.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?); @@ -89,17 +93,20 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP @override _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(Invocation.method(#fetchAndSetPlanSparse, [planId]), - returnValue: Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2())) + returnValue: + Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2())) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(Invocation.method(#fetchAndSetPlanFull, [planId]), - returnValue: Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2())) + returnValue: + Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2())) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod(Invocation.method(#addPlan, [planData]), - returnValue: Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2())) + returnValue: + Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2())) as _i9.Future<_i4.NutritionalPlan>); @override _i9.Future editPlan(_i4.NutritionalPlan? plan) => @@ -107,26 +114,31 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i9.Future); @override - _i9.Future deletePlan(int? id) => (super.noSuchMethod(Invocation.method(#deletePlan, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); + _i9.Future deletePlan(int? id) => + (super.noSuchMethod(Invocation.method(#deletePlan, [id]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i9.Future); @override _i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) => (super.noSuchMethod(Invocation.method(#addMeal, [meal, planId]), - returnValue: Future<_i5.Meal>.value(_FakeMeal_3())) as _i9.Future<_i5.Meal>); + returnValue: Future<_i5.Meal>.value(_FakeMeal_3())) + as _i9.Future<_i5.Meal>); @override _i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) => (super.noSuchMethod(Invocation.method(#editMeal, [meal]), - returnValue: Future<_i5.Meal>.value(_FakeMeal_3())) as _i9.Future<_i5.Meal>); + returnValue: Future<_i5.Meal>.value(_FakeMeal_3())) + as _i9.Future<_i5.Meal>); @override _i9.Future deleteMeal(_i5.Meal? meal) => (super.noSuchMethod(Invocation.method(#deleteMeal, [meal]), returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i9.Future); @override - _i9.Future<_i6.MealItem> addMealItem(_i6.MealItem? mealItem, _i5.Meal? meal) => + _i9.Future<_i6.MealItem> addMealItem( + _i6.MealItem? mealItem, _i5.Meal? meal) => (super.noSuchMethod(Invocation.method(#addMealItem, [mealItem, meal]), - returnValue: Future<_i6.MealItem>.value(_FakeMealItem_4())) as _i9.Future<_i6.MealItem>); + returnValue: Future<_i6.MealItem>.value(_FakeMealItem_4())) + as _i9.Future<_i6.MealItem>); @override _i9.Future deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod(Invocation.method(#deleteMealItem, [mealItem]), @@ -143,15 +155,25 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i9.Future); @override - _i9.Future> searchIngredient(String? name, [String? languageCode = r'en']) => - (super.noSuchMethod(Invocation.method(#searchIngredient, [name, languageCode]), - returnValue: Future>.value([])) as _i9.Future>); + _i9.Future> searchIngredient(String? name, + [String? languageCode = r'en']) => + (super.noSuchMethod( + Invocation.method(#searchIngredient, [name, languageCode]), + returnValue: Future>.value([])) + as _i9.Future>); @override _i9.Future logMealToDiary(_i5.Meal? meal) => (super.noSuchMethod(Invocation.method(#logMealToDiary, [meal]), returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i9.Future); @override + _i9.Future logIngredentToDiary(_i6.MealItem? mealItem, int? planId, + [DateTime? dateTime]) => + (super.noSuchMethod( + Invocation.method(#logIngredentToDiary, [mealItem, planId, dateTime]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i9.Future); + @override _i9.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod(Invocation.method(#deleteLog, [logId, planId]), returnValue: Future.value(), @@ -162,43 +184,50 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i9.Future); @override - Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + Uri makeUrl(String? path, + {int? id, String? objectMethod, Map? query}) => (super.noSuchMethod( - Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), + Invocation.method(#makeUrl, [path], + {#id: id, #objectMethod: objectMethod, #query: query}), returnValue: _FakeUri_6()) as Uri); @override - _i9.Future> fetch(Uri? uri) => - (super.noSuchMethod(Invocation.method(#fetch, [uri]), - returnValue: Future>.value({})) - as _i9.Future>); + _i9.Future> fetch(Uri? uri) => (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: Future>.value({})) + as _i9.Future>); @override _i9.Future> post(Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i9.Future>); @override - _i9.Future> patch(Map? data, Uri? uri) => + _i9.Future> patch( + Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i9.Future>); @override _i9.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod(Invocation.method(#deleteRequest, [url, id]), - returnValue: Future<_i3.Response>.value(_FakeResponse_7())) as _i9.Future<_i3.Response>); + returnValue: Future<_i3.Response>.value(_FakeResponse_7())) + as _i9.Future<_i3.Response>); @override String toString() => super.toString(); @override - void addListener(_i10.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); + void addListener(_i10.VoidCallback? listener) => + super.noSuchMethod(Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null); @override void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override - void dispose() => - super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); + void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), + returnValueForMissingStub: null); @override void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null); } diff --git a/test/other/base_provider_test.mocks.dart b/test/other/base_provider_test.mocks.dart index c64ebdcf..de3e7152 100644 --- a/test/other/base_provider_test.mocks.dart +++ b/test/other/base_provider_test.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.0.15 from annotations -// in wger/test/base_provider_test.dart. +// Mocks generated by Mockito 5.0.16 from annotations +// in wger/test/other/base_provider_test.dart. // Do not manually edit this file. import 'dart:async' as _i5; @@ -19,10 +19,12 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types class _FakeResponse_0 extends _i1.Fake implements _i2.Response {} -class _FakeStreamedResponse_1 extends _i1.Fake implements _i3.StreamedResponse {} +class _FakeStreamedResponse_1 extends _i1.Fake implements _i3.StreamedResponse { +} /// A class which mocks [Client]. /// @@ -35,51 +37,73 @@ class MockClient extends _i1.Mock implements _i4.Client { @override _i5.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod(Invocation.method(#head, [url], {#headers: headers}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) as _i5.Future<_i2.Response>); + returnValue: Future<_i2.Response>.value(_FakeResponse_0())) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod(Invocation.method(#get, [url], {#headers: headers}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) as _i5.Future<_i2.Response>); + returnValue: Future<_i2.Response>.value(_FakeResponse_0())) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> post(Uri? url, - {Map? headers, Object? body, _i6.Encoding? encoding}) => + {Map? headers, + Object? body, + _i6.Encoding? encoding}) => (super.noSuchMethod( - Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) as _i5.Future<_i2.Response>); + Invocation.method(#post, [url], + {#headers: headers, #body: body, #encoding: encoding}), + returnValue: Future<_i2.Response>.value(_FakeResponse_0())) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> put(Uri? url, - {Map? headers, Object? body, _i6.Encoding? encoding}) => + {Map? headers, + Object? body, + _i6.Encoding? encoding}) => (super.noSuchMethod( - Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) as _i5.Future<_i2.Response>); + Invocation.method(#put, [url], + {#headers: headers, #body: body, #encoding: encoding}), + returnValue: Future<_i2.Response>.value(_FakeResponse_0())) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> patch(Uri? url, - {Map? headers, Object? body, _i6.Encoding? encoding}) => + {Map? headers, + Object? body, + _i6.Encoding? encoding}) => (super.noSuchMethod( - Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) as _i5.Future<_i2.Response>); + Invocation.method(#patch, [url], + {#headers: headers, #body: body, #encoding: encoding}), + returnValue: Future<_i2.Response>.value(_FakeResponse_0())) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> delete(Uri? url, - {Map? headers, Object? body, _i6.Encoding? encoding}) => + {Map? headers, + Object? body, + _i6.Encoding? encoding}) => (super.noSuchMethod( - Invocation.method(#delete, [url], {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) as _i5.Future<_i2.Response>); + Invocation.method(#delete, [url], + {#headers: headers, #body: body, #encoding: encoding}), + returnValue: Future<_i2.Response>.value(_FakeResponse_0())) + as _i5.Future<_i2.Response>); @override _i5.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod(Invocation.method(#read, [url], {#headers: headers}), returnValue: Future.value('')) as _i5.Future); @override - _i5.Future<_i7.Uint8List> readBytes(Uri? url, {Map? headers}) => - (super.noSuchMethod(Invocation.method(#readBytes, [url], {#headers: headers}), - returnValue: Future<_i7.Uint8List>.value(_i7.Uint8List(0))) as _i5.Future<_i7.Uint8List>); + _i5.Future<_i7.Uint8List> readBytes(Uri? url, + {Map? headers}) => + (super.noSuchMethod( + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: Future<_i7.Uint8List>.value(_i7.Uint8List(0))) + as _i5.Future<_i7.Uint8List>); @override _i5.Future<_i3.StreamedResponse> send(_i8.BaseRequest? request) => (super.noSuchMethod(Invocation.method(#send, [request]), - returnValue: Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_1())) + returnValue: + Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_1())) as _i5.Future<_i3.StreamedResponse>); @override - void close() => - super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null); + void close() => super.noSuchMethod(Invocation.method(#close, []), + returnValueForMissingStub: null); @override String toString() => super.toString(); } diff --git a/test/workout/workout_form_test.mocks.dart b/test/workout/workout_form_test.mocks.dart index 9bfd1d08..0e935afc 100644 --- a/test/workout/workout_form_test.mocks.dart +++ b/test/workout/workout_form_test.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.0.15 from annotations -// in wger/test/workout_form_test.dart. +// Mocks generated by Mockito 5.0.16 from annotations +// in wger/test/workout/workout_form_test.dart. // Do not manually edit this file. import 'dart:async' as _i13; @@ -26,6 +26,7 @@ import 'package:wger/providers/workout_plans.dart' as _i12; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types class _FakeWeightUnit_0 extends _i1.Fake implements _i2.WeightUnit {} @@ -54,73 +55,79 @@ class _FakeResponse_11 extends _i1.Fake implements _i5.Response {} /// A class which mocks [WorkoutPlansProvider]. /// /// See the documentation for Mockito's code generation for more information. -class MockWorkoutPlansProvider extends _i1.Mock implements _i12.WorkoutPlansProvider { +class MockWorkoutPlansProvider extends _i1.Mock + implements _i12.WorkoutPlansProvider { MockWorkoutPlansProvider() { _i1.throwOnMissingStub(this); } @override List<_i6.WorkoutPlan> get items => - (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i6.WorkoutPlan>[]) - as List<_i6.WorkoutPlan>); + (super.noSuchMethod(Invocation.getter(#items), + returnValue: <_i6.WorkoutPlan>[]) as List<_i6.WorkoutPlan>); @override List<_i2.WeightUnit> get weightUnits => - (super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i2.WeightUnit>[]) - as List<_i2.WeightUnit>); + (super.noSuchMethod(Invocation.getter(#weightUnits), + returnValue: <_i2.WeightUnit>[]) as List<_i2.WeightUnit>); @override _i2.WeightUnit get defaultWeightUnit => - (super.noSuchMethod(Invocation.getter(#defaultWeightUnit), returnValue: _FakeWeightUnit_0()) - as _i2.WeightUnit); + (super.noSuchMethod(Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_0()) as _i2.WeightUnit); @override List<_i3.RepetitionUnit> get repetitionUnits => - (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i3.RepetitionUnit>[]) - as List<_i3.RepetitionUnit>); + (super.noSuchMethod(Invocation.getter(#repetitionUnits), + returnValue: <_i3.RepetitionUnit>[]) as List<_i3.RepetitionUnit>); @override _i3.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod(Invocation.getter(#defaultRepetitionUnit), returnValue: _FakeRepetitionUnit_1()) as _i3.RepetitionUnit); @override - _i4.AuthProvider get auth => - (super.noSuchMethod(Invocation.getter(#auth), returnValue: _FakeAuthProvider_2()) - as _i4.AuthProvider); + _i4.AuthProvider get auth => (super.noSuchMethod(Invocation.getter(#auth), + returnValue: _FakeAuthProvider_2()) as _i4.AuthProvider); @override set auth(_i4.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#auth, _auth), + returnValueForMissingStub: null); @override - _i5.Client get client => - (super.noSuchMethod(Invocation.getter(#client), returnValue: _FakeClient_3()) as _i5.Client); + _i5.Client get client => (super.noSuchMethod(Invocation.getter(#client), + returnValue: _FakeClient_3()) as _i5.Client); @override set client(_i5.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#client, _client), + returnValueForMissingStub: null); @override bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - void clear() => - super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); + void clear() => super.noSuchMethod(Invocation.method(#clear, []), + returnValueForMissingStub: null); @override _i6.WorkoutPlan findById(int? id) => - (super.noSuchMethod(Invocation.method(#findById, [id]), returnValue: _FakeWorkoutPlan_4()) - as _i6.WorkoutPlan); + (super.noSuchMethod(Invocation.method(#findById, [id]), + returnValue: _FakeWorkoutPlan_4()) as _i6.WorkoutPlan); @override - int findIndexById(int? id) => - (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); + int findIndexById(int? id) => (super + .noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) + as int); @override void setCurrentPlan(int? id) => - super.noSuchMethod(Invocation.method(#setCurrentPlan, [id]), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.method(#setCurrentPlan, [id]), + returnValueForMissingStub: null); @override void resetCurrentPlan() => - super.noSuchMethod(Invocation.method(#resetCurrentPlan, []), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.method(#resetCurrentPlan, []), + returnValueForMissingStub: null); @override - _i13.Future fetchAndSetAllPlansFull() => - (super.noSuchMethod(Invocation.method(#fetchAndSetAllPlansFull, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansFull, []), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => - (super.noSuchMethod(Invocation.method(#fetchAndSetAllPlansSparse, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansSparse, []), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); @override _i13.Future<_i6.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(Invocation.method(#fetchAndSetPlanSparse, [planId]), @@ -128,7 +135,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i12.WorkoutPlansProv as _i13.Future<_i6.WorkoutPlan>); @override _i13.Future<_i6.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => - (super.noSuchMethod(Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), + (super.noSuchMethod( + Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), returnValue: Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan_4())) as _i13.Future<_i6.WorkoutPlan>); @override @@ -139,78 +147,89 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i12.WorkoutPlansProv @override _i13.Future editWorkout(_i6.WorkoutPlan? workout) => (super.noSuchMethod(Invocation.method(#editWorkout, [workout]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) + as _i13.Future); @override - _i13.Future deleteWorkout(int? id) => - (super.noSuchMethod(Invocation.method(#deleteWorkout, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future deleteWorkout(int? id) => (super.noSuchMethod( + Invocation.method(#deleteWorkout, [id]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); @override _i13.Future> fetchLogData( _i6.WorkoutPlan? workout, _i14.Exercise? exercise) => (super.noSuchMethod(Invocation.method(#fetchLogData, [workout, exercise]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i13.Future>); @override - _i13.Future fetchAndSetRepetitionUnits() => - (super.noSuchMethod(Invocation.method(#fetchAndSetRepetitionUnits, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); - @override - _i13.Future fetchAndSetWeightUnits() => - (super.noSuchMethod(Invocation.method(#fetchAndSetWeightUnits, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); - @override - _i13.Future fetchAndSetUnits() => - (super.noSuchMethod(Invocation.method(#fetchAndSetUnits, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); - @override - _i13.Future<_i7.Day> addDay(_i7.Day? day, _i6.WorkoutPlan? workout) => - (super.noSuchMethod(Invocation.method(#addDay, [day, workout]), - returnValue: Future<_i7.Day>.value(_FakeDay_5())) as _i13.Future<_i7.Day>); - @override - _i13.Future editDay(_i7.Day? day) => (super.noSuchMethod(Invocation.method(#editDay, [day]), + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( + Invocation.method(#fetchAndSetRepetitionUnits, []), returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i13.Future); @override - _i13.Future deleteDay(_i7.Day? day) => - (super.noSuchMethod(Invocation.method(#deleteDay, [day]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); + @override + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( + Invocation.method(#fetchAndSetUnits, []), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); + @override + _i13.Future<_i7.Day> addDay(_i7.Day? day, _i6.WorkoutPlan? workout) => + (super.noSuchMethod(Invocation.method(#addDay, [day, workout]), + returnValue: Future<_i7.Day>.value(_FakeDay_5())) + as _i13.Future<_i7.Day>); + @override + _i13.Future editDay(_i7.Day? day) => (super.noSuchMethod( + Invocation.method(#editDay, [day]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); + @override + _i13.Future deleteDay(_i7.Day? day) => (super.noSuchMethod( + Invocation.method(#deleteDay, [day]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); @override _i13.Future<_i8.Set> addSet(_i8.Set? workoutSet) => (super.noSuchMethod(Invocation.method(#addSet, [workoutSet]), - returnValue: Future<_i8.Set>.value(_FakeSet_6())) as _i13.Future<_i8.Set>); + returnValue: Future<_i8.Set>.value(_FakeSet_6())) + as _i13.Future<_i8.Set>); @override - _i13.Future editSet(_i8.Set? workoutSet) => - (super.noSuchMethod(Invocation.method(#editSet, [workoutSet]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future editSet(_i8.Set? workoutSet) => (super.noSuchMethod( + Invocation.method(#editSet, [workoutSet]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); @override - _i13.Future> reorderSets(List<_i8.Set>? sets, int? startIndex) => + _i13.Future> reorderSets( + List<_i8.Set>? sets, int? startIndex) => (super.noSuchMethod(Invocation.method(#reorderSets, [sets, startIndex]), - returnValue: Future>.value(<_i8.Set>[])) as _i13.Future>); + returnValue: Future>.value(<_i8.Set>[])) + as _i13.Future>); @override - _i13.Future fetchComputedSettings(_i8.Set? workoutSet) => - (super.noSuchMethod(Invocation.method(#fetchComputedSettings, [workoutSet]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future fetchComputedSettings(_i8.Set? workoutSet) => (super + .noSuchMethod(Invocation.method(#fetchComputedSettings, [workoutSet]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) + as _i13.Future); @override - _i13.Future fetchSmartText(_i8.Set? workoutSet, _i14.Exercise? exercise) => - (super.noSuchMethod(Invocation.method(#fetchSmartText, [workoutSet, exercise]), + _i13.Future fetchSmartText( + _i8.Set? workoutSet, _i14.Exercise? exercise) => + (super.noSuchMethod( + Invocation.method(#fetchSmartText, [workoutSet, exercise]), returnValue: Future.value('')) as _i13.Future); @override - _i13.Future deleteSet(_i8.Set? workoutSet) => - (super.noSuchMethod(Invocation.method(#deleteSet, [workoutSet]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future deleteSet(_i8.Set? workoutSet) => (super.noSuchMethod( + Invocation.method(#deleteSet, [workoutSet]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); @override _i13.Future<_i9.Setting> addSetting(_i9.Setting? workoutSetting) => (super.noSuchMethod(Invocation.method(#addSetting, [workoutSetting]), - returnValue: Future<_i9.Setting>.value(_FakeSetting_7())) as _i13.Future<_i9.Setting>); + returnValue: Future<_i9.Setting>.value(_FakeSetting_7())) + as _i13.Future<_i9.Setting>); @override _i13.Future fetchSessionData() => (super.noSuchMethod(Invocation.method(#fetchSessionData, []), @@ -218,55 +237,65 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i12.WorkoutPlansProv @override _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod(Invocation.method(#addSession, [session]), - returnValue: Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8())) + returnValue: + Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8())) as _i13.Future<_i10.WorkoutSession>); @override _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod(Invocation.method(#addLog, [log]), - returnValue: Future<_i11.Log>.value(_FakeLog_9())) as _i13.Future<_i11.Log>); + returnValue: Future<_i11.Log>.value(_FakeLog_9())) + as _i13.Future<_i11.Log>); @override - _i13.Future deleteLog(_i11.Log? log) => - (super.noSuchMethod(Invocation.method(#deleteLog, [log]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future deleteLog(_i11.Log? log) => (super.noSuchMethod( + Invocation.method(#deleteLog, [log]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i13.Future); @override - Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + Uri makeUrl(String? path, + {int? id, String? objectMethod, Map? query}) => (super.noSuchMethod( - Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), + Invocation.method(#makeUrl, [path], + {#id: id, #objectMethod: objectMethod, #query: query}), returnValue: _FakeUri_10()) as Uri); @override - _i13.Future> fetch(Uri? uri) => - (super.noSuchMethod(Invocation.method(#fetch, [uri]), - returnValue: Future>.value({})) - as _i13.Future>); + _i13.Future> fetch(Uri? uri) => (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: Future>.value({})) + as _i13.Future>); @override - _i13.Future> post(Map? data, Uri? uri) => + _i13.Future> post( + Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i13.Future>); @override - _i13.Future> patch(Map? data, Uri? uri) => + _i13.Future> patch( + Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i13.Future>); @override - _i13.Future<_i5.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod( - Invocation.method(#deleteRequest, [url, id]), - returnValue: Future<_i5.Response>.value(_FakeResponse_11())) as _i13.Future<_i5.Response>); + _i13.Future<_i5.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod(Invocation.method(#deleteRequest, [url, id]), + returnValue: Future<_i5.Response>.value(_FakeResponse_11())) + as _i13.Future<_i5.Response>); @override String toString() => super.toString(); @override - void addListener(_i15.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); + void addListener(_i15.VoidCallback? listener) => + super.noSuchMethod(Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null); @override void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override - void dispose() => - super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); + void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), + returnValueForMissingStub: null); @override void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null); } diff --git a/test/workout/workout_set_form_test.mocks.dart b/test/workout/workout_set_form_test.mocks.dart index b6cef929..3c5a2667 100644 --- a/test/workout/workout_set_form_test.mocks.dart +++ b/test/workout/workout_set_form_test.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.0.15 from annotations -// in wger/test/workout_set_form_test.dart. +// Mocks generated by Mockito 5.0.16 from annotations +// in wger/test/workout/workout_set_form_test.dart. // Do not manually edit this file. import 'dart:async' as _i6; @@ -18,6 +18,7 @@ import 'package:wger/providers/exercises.dart' as _i5; // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types class _FakeAuthProvider_0 extends _i1.Fake implements _i2.AuthProvider {} @@ -38,29 +39,30 @@ class MockExercisesProvider extends _i1.Mock implements _i5.ExercisesProvider { } @override - List<_i4.Exercise> get items => - (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i4.Exercise>[]) - as List<_i4.Exercise>); + List<_i4.Exercise> get items => (super.noSuchMethod(Invocation.getter(#items), + returnValue: <_i4.Exercise>[]) as List<_i4.Exercise>); @override - _i2.AuthProvider get auth => - (super.noSuchMethod(Invocation.getter(#auth), returnValue: _FakeAuthProvider_0()) - as _i2.AuthProvider); + _i2.AuthProvider get auth => (super.noSuchMethod(Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0()) as _i2.AuthProvider); @override set auth(_i2.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#auth, _auth), + returnValueForMissingStub: null); @override - _i3.Client get client => - (super.noSuchMethod(Invocation.getter(#client), returnValue: _FakeClient_1()) as _i3.Client); + _i3.Client get client => (super.noSuchMethod(Invocation.getter(#client), + returnValue: _FakeClient_1()) as _i3.Client); @override set client(_i3.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.setter(#client, _client), + returnValueForMissingStub: null); @override bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override - _i4.Exercise findById(int? exerciseId) => (super - .noSuchMethod(Invocation.method(#findById, [exerciseId]), returnValue: _FakeExercise_2()) - as _i4.Exercise); + _i4.Exercise findById(int? exerciseId) => + (super.noSuchMethod(Invocation.method(#findById, [exerciseId]), + returnValue: _FakeExercise_2()) as _i4.Exercise); @override _i6.Future fetchAndSetCategories() => (super.noSuchMethod(Invocation.method(#fetchAndSetCategories, []), @@ -79,54 +81,65 @@ class MockExercisesProvider extends _i1.Mock implements _i5.ExercisesProvider { @override _i6.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod(Invocation.method(#fetchAndSetExercise, [exerciseId]), - returnValue: Future<_i4.Exercise>.value(_FakeExercise_2())) as _i6.Future<_i4.Exercise>); + returnValue: Future<_i4.Exercise>.value(_FakeExercise_2())) + as _i6.Future<_i4.Exercise>); @override _i6.Future fetchAndSetExercises() => (super.noSuchMethod(Invocation.method(#fetchAndSetExercises, []), returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i6.Future); @override - _i6.Future> searchExercise(String? name, [String? languageCode = r'en']) => - (super.noSuchMethod(Invocation.method(#searchExercise, [name, languageCode]), - returnValue: Future>.value([])) as _i6.Future>); - @override - Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + _i6.Future> searchExercise(String? name, + [String? languageCode = r'en']) => (super.noSuchMethod( - Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), + Invocation.method(#searchExercise, [name, languageCode]), + returnValue: Future>.value([])) + as _i6.Future>); + @override + Uri makeUrl(String? path, + {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method(#makeUrl, [path], + {#id: id, #objectMethod: objectMethod, #query: query}), returnValue: _FakeUri_3()) as Uri); @override - _i6.Future> fetch(Uri? uri) => - (super.noSuchMethod(Invocation.method(#fetch, [uri]), - returnValue: Future>.value({})) - as _i6.Future>); + _i6.Future> fetch(Uri? uri) => (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: Future>.value({})) + as _i6.Future>); @override _i6.Future> post(Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i6.Future>); @override - _i6.Future> patch(Map? data, Uri? uri) => + _i6.Future> patch( + Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) + returnValue: + Future>.value({})) as _i6.Future>); @override _i6.Future<_i3.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod(Invocation.method(#deleteRequest, [url, id]), - returnValue: Future<_i3.Response>.value(_FakeResponse_4())) as _i6.Future<_i3.Response>); + returnValue: Future<_i3.Response>.value(_FakeResponse_4())) + as _i6.Future<_i3.Response>); @override String toString() => super.toString(); @override - void addListener(_i7.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); + void addListener(_i7.VoidCallback? listener) => + super.noSuchMethod(Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override - void dispose() => - super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); + void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), + returnValueForMissingStub: null); @override void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null); }