From 21c6fcb4daf13ea236e660b7ba8ee5000660034c Mon Sep 17 00:00:00 2001 From: Florian Schmitz Date: Tue, 27 Sep 2022 14:37:20 +0200 Subject: [PATCH 01/15] Add measurement unit to MeasurementEntryForm --- lib/widgets/measurements/forms.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/widgets/measurements/forms.dart b/lib/widgets/measurements/forms.dart index ee7bea3d..6270757d 100644 --- a/lib/widgets/measurements/forms.dart +++ b/lib/widgets/measurements/forms.dart @@ -156,6 +156,11 @@ class MeasurementEntryForm extends StatelessWidget { @override Widget build(BuildContext context) { + final measurementProvider = Provider.of(context, listen: false); + final measurementCategory = measurementProvider.categories.firstWhere( + (category) => category.id == _categoryId, + ); + return Form( key: _form, child: Column( @@ -199,7 +204,11 @@ class MeasurementEntryForm extends StatelessWidget { ), // Value TextFormField( - decoration: InputDecoration(labelText: AppLocalizations.of(context).value), + decoration: InputDecoration( + labelText: AppLocalizations.of(context).value, + suffixIcon: Text(measurementCategory.unit), + suffixIconConstraints: const BoxConstraints(minWidth: 0, minHeight: 0), + ), controller: _valueController, keyboardType: TextInputType.number, validator: (value) { From f3fe61779495d1e58ce9b6909145a900775d45bd Mon Sep 17 00:00:00 2001 From: Florian Schmitz Date: Tue, 27 Sep 2022 14:41:50 +0200 Subject: [PATCH 02/15] Added myself to AUTHORS.md --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index ea77dc6e..a8228e1b 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -13,6 +13,7 @@ - Marko Milosevic - - Karthik Reddy (Axel) - - Ogundoyin Toluwani - +- Florian Schmitz - ## Translators From 58ff62048ba4e0493413308156d72aac5a0c949b Mon Sep 17 00:00:00 2001 From: JustinBenito <83128918+JustinBenito@users.noreply.github.com> Date: Fri, 30 Sep 2022 23:51:25 +0530 Subject: [PATCH 03/15] Removing Bug which allows users to enter whitespace which is not accepted. Users mistakenly enter space which strikes an error, to stop this, entering space is ignored and not included, instead of throwing an error. --- lib/screens/auth_screen.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/screens/auth_screen.dart b/lib/screens/auth_screen.dart index 6a80be1b..d3d77cae 100644 --- a/lib/screens/auth_screen.dart +++ b/lib/screens/auth_screen.dart @@ -221,6 +221,7 @@ class _AuthCardState extends State { } return null; }, + inputFormatters: [FilteringTextInputFormatter.deny(new RegExp(r"\s\b|\b\s"))], onSaved: (value) { _authData['username'] = value!; }, From 3e8e1c8f1681c7db1536cdfb3a7950248729a762 Mon Sep 17 00:00:00 2001 From: Aditya <62930521+adityar224@users.noreply.github.com> Date: Sun, 2 Oct 2022 08:15:08 +0530 Subject: [PATCH 04/15] Removed Deprecated Code --- lib/helpers/misc.dart | 4 ++-- lib/models/nutrition/nutritional_values.dart | 4 ++-- lib/models/workouts/log.dart | 3 ++- lib/screens/home_tabs_screen.dart | 2 +- lib/theme/theme.dart | 4 ++-- lib/widgets/dashboard/widgets.dart | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/helpers/misc.dart b/lib/helpers/misc.dart index 05e5d693..62272b06 100644 --- a/lib/helpers/misc.dart +++ b/lib/helpers/misc.dart @@ -93,8 +93,8 @@ extension TimeOfDayExtension on TimeOfDay { } void launchURL(String url, BuildContext context) async { - await canLaunch(url) - ? await launch(url) + await canLaunchUrl(Uri.parse(url)) + ? await launchUrl(Uri.parse(url)) : ScaffoldMessenger.of(context).showSnackBar( SnackBar(content: Text('Could not open $url.')), ); diff --git a/lib/models/nutrition/nutritional_values.dart b/lib/models/nutrition/nutritional_values.dart index ed08ac62..56251ca5 100644 --- a/lib/models/nutrition/nutritional_values.dart +++ b/lib/models/nutrition/nutritional_values.dart @@ -91,8 +91,8 @@ class NutritionalValues { @override //ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => hashValues( - energy, protein, carbohydrates, carbohydratesSugar, fat, fatSaturated, fibres, sodium); + int get hashCode => Object.hash(energy, protein, carbohydrates, + carbohydratesSugar, fat, fatSaturated, fibres, sodium); } class BaseNutritionalValues { diff --git a/lib/models/workouts/log.dart b/lib/models/workouts/log.dart index 2ee6ad6b..edcdd588 100644 --- a/lib/models/workouts/log.dart +++ b/lib/models/workouts/log.dart @@ -133,7 +133,8 @@ class Log { @override //ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => hashValues(exerciseId, weight, weightUnitId, reps, repetitionUnitId, rir); + int get hashCode => Object.hash( + exerciseId, weight, weightUnitId, reps, repetitionUnitId, rir); //@override //int get hashCode => super.hashCode; diff --git a/lib/screens/home_tabs_screen.dart b/lib/screens/home_tabs_screen.dart index 48389d86..e2659154 100644 --- a/lib/screens/home_tabs_screen.dart +++ b/lib/screens/home_tabs_screen.dart @@ -165,7 +165,7 @@ class _HomeTabsScreenState extends State with SingleTickerProvid ), BottomNavigationBarItem( icon: const FaIcon( - FontAwesomeIcons.weight, + FontAwesomeIcons.weightScale, size: 20, ), label: AppLocalizations.of(context).weight, diff --git a/lib/theme/theme.dart b/lib/theme/theme.dart index 19a9ae72..c10ff0e0 100644 --- a/lib/theme/theme.dart +++ b/lib/theme/theme.dart @@ -100,14 +100,14 @@ final ThemeData wgerTheme = ThemeData( ), outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( - primary: wgerPrimaryButtonColor, + foregroundColor: wgerPrimaryButtonColor, visualDensity: VisualDensity.compact, side: const BorderSide(color: wgerPrimaryButtonColor), ), ), elevatedButtonTheme: ElevatedButtonThemeData( style: ElevatedButton.styleFrom( - primary: wgerPrimaryButtonColor, + backgroundColor: wgerPrimaryButtonColor, ), ), diff --git a/lib/widgets/dashboard/widgets.dart b/lib/widgets/dashboard/widgets.dart index baf1213c..8979821e 100644 --- a/lib/widgets/dashboard/widgets.dart +++ b/lib/widgets/dashboard/widgets.dart @@ -253,7 +253,7 @@ class _DashboardWeightWidgetState extends State { style: Theme.of(context).textTheme.headline4, ), leading: const FaIcon( - FontAwesomeIcons.weight, + FontAwesomeIcons.weightScale, color: Colors.black, ), trailing: IconButton( From 5c767f311ee0704e842890f799aa2c258050aac8 Mon Sep 17 00:00:00 2001 From: Vinod Date: Sun, 2 Oct 2022 11:40:53 +0530 Subject: [PATCH 05/15] added code: string? in ingredient.dart --- ios/Runner/Info.plist | 2 + lib/models/body_weight/weight_entry.g.dart | 3 +- lib/models/exercises/category.g.dart | 3 +- lib/models/exercises/exercise.g.dart | 6 +- lib/models/exercises/image.g.dart | 3 +- .../measurements/measurement_category.g.dart | 4 +- .../measurements/measurement_entry.g.dart | 3 +- lib/models/nutrition/ingredient.dart | 2 +- lib/models/nutrition/ingredient.g.dart | 5 +- .../nutrition/ingredient_weight_unit.g.dart | 6 +- lib/models/nutrition/log.g.dart | 9 +- lib/models/nutrition/nutritional_plan.g.dart | 3 +- lib/models/nutrition/weight_unit.g.dart | 3 +- lib/models/workouts/repetition_unit.g.dart | 3 +- lib/models/workouts/session.g.dart | 12 +- lib/models/workouts/weight_unit.g.dart | 3 +- lib/models/workouts/workout_plan.g.dart | 3 +- pubspec.lock | 24 +- test/gallery/gallery_screen_test.mocks.dart | 324 ++++++-- ...surement_categories_screen_test.mocks.dart | 249 ++++-- .../measurement_provider_test.mocks.dart | 188 ++++- .../nutritional_plan_form_test.mocks.dart | 621 +++++++++++--- test/other/base_provider_test.mocks.dart | 273 +++++-- test/workout/workout_form_test.mocks.dart | 768 ++++++++++++++---- test/workout/workout_set_form_test.mocks.dart | 359 ++++++-- 25 files changed, 2272 insertions(+), 607 deletions(-) diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index cbd6d940..b8ebd6ec 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -41,5 +41,7 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + diff --git a/lib/models/body_weight/weight_entry.g.dart b/lib/models/body_weight/weight_entry.g.dart index d1152d20..60ee02c9 100644 --- a/lib/models/body_weight/weight_entry.g.dart +++ b/lib/models/body_weight/weight_entry.g.dart @@ -18,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 915120d1..19383107 100644 --- a/lib/models/exercises/category.g.dart +++ b/lib/models/exercises/category.g.dart @@ -17,7 +17,8 @@ ExerciseCategory _$ExerciseCategoryFromJson(Map json) { ); } -Map _$ExerciseCategoryToJson(ExerciseCategory instance) => { +Map _$ExerciseCategoryToJson(ExerciseCategory instance) => + { 'id': instance.id, 'name': instance.name, }; diff --git a/lib/models/exercises/exercise.g.dart b/lib/models/exercises/exercise.g.dart index 68183089..614ff9b2 100644 --- a/lib/models/exercises/exercise.g.dart +++ b/lib/models/exercises/exercise.g.dart @@ -48,7 +48,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) => { @@ -59,7 +60,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(), 'videos': instance.videos.map((e) => e.toJson()).toList(), diff --git a/lib/models/exercises/image.g.dart b/lib/models/exercises/image.g.dart index 6ef7c62e..1240dc38 100644 --- a/lib/models/exercises/image.g.dart +++ b/lib/models/exercises/image.g.dart @@ -20,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/measurements/measurement_category.g.dart b/lib/models/measurements/measurement_category.g.dart index eb887b2e..ef4ebcd3 100644 --- a/lib/models/measurements/measurement_category.g.dart +++ b/lib/models/measurements/measurement_category.g.dart @@ -22,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 7f6e346a..4b096960 100644 --- a/lib/models/measurements/measurement_entry.g.dart +++ b/lib/models/measurements/measurement_entry.g.dart @@ -20,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.dart b/lib/models/nutrition/ingredient.dart index a60d6f79..cb550d60 100644 --- a/lib/models/nutrition/ingredient.dart +++ b/lib/models/nutrition/ingredient.dart @@ -27,7 +27,7 @@ class Ingredient { /// Barcode of the product @JsonKey(required: true) - final String code; + final String? code; /// Name of the product @JsonKey(required: true) diff --git a/lib/models/nutrition/ingredient.g.dart b/lib/models/nutrition/ingredient.g.dart index 5c19de59..eaace92b 100644 --- a/lib/models/nutrition/ingredient.g.dart +++ b/lib/models/nutrition/ingredient.g.dart @@ -26,7 +26,7 @@ Ingredient _$IngredientFromJson(Map json) { ); return Ingredient( id: json['id'] as int, - code: json['code'] as String, + code: json['code'] as String?, name: json['name'] as String, creationDate: DateTime.parse(json['creation_date'] as String), energy: json['energy'] as int, @@ -40,7 +40,8 @@ Ingredient _$IngredientFromJson(Map json) { ); } -Map _$IngredientToJson(Ingredient instance) => { +Map _$IngredientToJson(Ingredient instance) => + { 'id': instance.id, 'code': instance.code, 'name': instance.name, diff --git a/lib/models/nutrition/ingredient_weight_unit.g.dart b/lib/models/nutrition/ingredient_weight_unit.g.dart index f147a2ee..74b1f101 100644 --- a/lib/models/nutrition/ingredient_weight_unit.g.dart +++ b/lib/models/nutrition/ingredient_weight_unit.g.dart @@ -13,14 +13,16 @@ IngredientWeightUnit _$IngredientWeightUnitFromJson(Map json) { ); 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 61690155..39068768 100644 --- a/lib/models/nutrition/log.g.dart +++ b/lib/models/nutrition/log.g.dart @@ -9,7 +9,14 @@ part of 'log.dart'; Log _$LogFromJson(Map json) { $checkKeys( json, - requiredKeys: const ['id', 'plan', 'datetime', 'ingredient', 'weight_unit', 'amount'], + requiredKeys: const [ + 'id', + 'plan', + 'datetime', + 'ingredient', + 'weight_unit', + 'amount' + ], ); return Log( id: json['id'] as int?, diff --git a/lib/models/nutrition/nutritional_plan.g.dart b/lib/models/nutrition/nutritional_plan.g.dart index 661a9f47..9b10d8a5 100644 --- a/lib/models/nutrition/nutritional_plan.g.dart +++ b/lib/models/nutrition/nutritional_plan.g.dart @@ -18,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 6f2b9607..74e1f0cf 100644 --- a/lib/models/nutrition/weight_unit.g.dart +++ b/lib/models/nutrition/weight_unit.g.dart @@ -17,7 +17,8 @@ WeightUnit _$WeightUnitFromJson(Map json) { ); } -Map _$WeightUnitToJson(WeightUnit instance) => { +Map _$WeightUnitToJson(WeightUnit instance) => + { 'id': instance.id, 'name': instance.name, }; diff --git a/lib/models/workouts/repetition_unit.g.dart b/lib/models/workouts/repetition_unit.g.dart index 33e6a815..115dc338 100644 --- a/lib/models/workouts/repetition_unit.g.dart +++ b/lib/models/workouts/repetition_unit.g.dart @@ -17,7 +17,8 @@ RepetitionUnit _$RepetitionUnitFromJson(Map json) { ); } -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 79f4fee4..e16affad 100644 --- a/lib/models/workouts/session.g.dart +++ b/lib/models/workouts/session.g.dart @@ -9,7 +9,14 @@ part of 'session.dart'; WorkoutSession _$WorkoutSessionFromJson(Map json) { $checkKeys( json, - requiredKeys: const ['id', 'workout', 'date', 'impression', 'time_start', 'time_end'], + requiredKeys: const [ + 'id', + 'workout', + 'date', + 'impression', + 'time_start', + 'time_end' + ], ); return WorkoutSession() ..id = json['id'] as int? @@ -21,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/weight_unit.g.dart b/lib/models/workouts/weight_unit.g.dart index 6f2b9607..74e1f0cf 100644 --- a/lib/models/workouts/weight_unit.g.dart +++ b/lib/models/workouts/weight_unit.g.dart @@ -17,7 +17,8 @@ WeightUnit _$WeightUnitFromJson(Map json) { ); } -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 ac1d6fa9..ef156e3e 100644 --- a/lib/models/workouts/workout_plan.g.dart +++ b/lib/models/workouts/workout_plan.g.dart @@ -19,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 4d4de47e..48decb10 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,7 +42,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.9.0" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -154,7 +154,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.0" charcode: dependency: transitive description: @@ -217,7 +217,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.0" code_builder: dependency: transitive description: @@ -287,7 +287,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.0" ffi: dependency: transitive description: @@ -594,21 +594,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.12" + version: "0.12.11" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.5" + version: "0.1.4" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.7.0" mime: dependency: transitive description: @@ -664,7 +664,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.8.1" path_drawing: dependency: transitive description: @@ -879,7 +879,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.9.0" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -907,7 +907,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.0" table_calendar: dependency: "direct main" description: @@ -921,14 +921,14 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.12" + version: "0.4.9" timing: dependency: transitive description: diff --git a/test/gallery/gallery_screen_test.mocks.dart b/test/gallery/gallery_screen_test.mocks.dart index 89ded6c3..608c747a 100644 --- a/test/gallery/gallery_screen_test.mocks.dart +++ b/test/gallery/gallery_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.17 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in wger/test/gallery/gallery_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i8; @@ -12,6 +13,7 @@ import 'package:wger/models/gallery/image.dart' as _i5; import 'package:wger/providers/auth.dart' as _i2; import 'package:wger/providers/gallery.dart' as _i4; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -20,14 +22,47 @@ import 'package:wger/providers/gallery.dart' as _i4; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeAuthProvider_0 extends _i1.Fake implements _i2.AuthProvider {} +class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { + _FakeAuthProvider_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_1 extends _i1.Fake implements _i3.Client {} +class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { + _FakeClient_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeUri_2 extends _i1.Fake implements Uri {} +class _FakeUri_2 extends _i1.SmartFake implements Uri { + _FakeUri_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeResponse_3 extends _i1.Fake implements _i3.Response {} +class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { + _FakeResponse_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [GalleryProvider]. /// @@ -38,87 +73,238 @@ 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); + set images(List<_i5.Image>? _images) => 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( + this, + Invocation.getter(#auth), + ), + ) as _i2.AuthProvider); @override - set auth(_i2.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + set auth(_i2.AuthProvider? _auth) => 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( + this, + Invocation.getter(#client), + ), + ) as _i3.Client); @override - set client(_i3.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + set client(_i3.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + bool get hasListeners => (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, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + _i6.Future fetchAndSetGallery() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetGallery, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future addImage(_i5.Image? image, _i7.XFile? imageFile) => - (super.noSuchMethod(Invocation.method(#addImage, [image, imageFile]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future editImage(_i5.Image? image, _i7.XFile? imageFile) => - (super.noSuchMethod(Invocation.method(#editImage, [image, imageFile]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteImage(_i5.Image? image) => - (super.noSuchMethod(Invocation.method(#deleteImage, [image]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + _i6.Future addImage( + _i5.Image? image, + _i7.XFile? imageFile, + ) => (super.noSuchMethod( + Invocation.method( + #addImage, + [ + image, + imageFile, + ], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future editImage( + _i5.Image? image, + _i7.XFile? imageFile, + ) => + (super.noSuchMethod( + Invocation.method( + #editImage, + [ + image, + imageFile, + ], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( + Invocation.method( + #deleteImage, + [image], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.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_2( + this, Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), - returnValue: _FakeUri_2()) as Uri); + #makeUrl, + [path], + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, + ), + ), + ) 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: + _i6.Future>.value({}), + ) as _i6.Future>); @override - _i6.Future> post(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) - as _i6.Future>); + _i6.Future> post( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #post, + [ + data, + uri, + ], + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override - _i6.Future> patch(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) - as _i6.Future>); + _i6.Future> patch( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #patch, + [ + data, + uri, + ], + ), + returnValue: + _i6.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>); + _i6.Future<_i3.Response> deleteRequest( + String? url, + int? id, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_3( + this, + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + )), + ) as _i6.Future<_i3.Response>); @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); + 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); + void notifyListeners() => 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 99391efb..eab13e15 100644 --- a/test/measurements/measurement_categories_screen_test.mocks.dart +++ b/test/measurements/measurement_categories_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.17 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in wger/test/measurements/measurement_categories_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:ui' as _i7; @@ -11,6 +12,7 @@ import 'package:wger/models/measurements/measurement_entry.dart' as _i6; import 'package:wger/providers/base_provider.dart' as _i2; import 'package:wger/providers/measurement.dart' as _i4; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -19,95 +21,220 @@ import 'package:wger/providers/measurement.dart' as _i4; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeWgerBaseProvider_0 extends _i1.Fake implements _i2.WgerBaseProvider {} +class _FakeWgerBaseProvider_0 extends _i1.SmartFake + implements _i2.WgerBaseProvider { + _FakeWgerBaseProvider_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeMeasurementCategory_1 extends _i1.Fake implements _i3.MeasurementCategory {} +class _FakeMeasurementCategory_1 extends _i1.SmartFake + implements _i3.MeasurementCategory { + _FakeMeasurementCategory_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// 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); + _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0( + this, + Invocation.getter(#baseProvider), + ), + ) as _i2.WgerBaseProvider); @override - List<_i3.MeasurementCategory> get categories => - (super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i3.MeasurementCategory>[]) - as List<_i3.MeasurementCategory>); + List<_i3.MeasurementCategory> get categories => (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); + bool get hasListeners => (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( + this, + Invocation.method( + #findCategoryById, + [id], + ), + ), + ) as _i3.MeasurementCategory); @override - _i5.Future fetchAndSetCategories() => - (super.noSuchMethod(Invocation.method(#fetchAndSetCategories, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + _i5.Future fetchAndSetCategories() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetCategories, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override - _i5.Future fetchAndSetCategoryEntries(int? id) => - (super.noSuchMethod(Invocation.method(#fetchAndSetCategoryEntries, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + _i5.Future fetchAndSetCategoryEntries(int? id) => (super.noSuchMethod( + Invocation.method( + #fetchAndSetCategoryEntries, + [id], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.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: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override _i5.Future addCategory(_i3.MeasurementCategory? category) => - (super.noSuchMethod(Invocation.method(#addCategory, [category]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + (super.noSuchMethod( + Invocation.method( + #addCategory, + [category], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override - _i5.Future deleteCategory(int? id) => - (super.noSuchMethod(Invocation.method(#deleteCategory, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + _i5.Future deleteCategory(int? id) => (super.noSuchMethod( + Invocation.method( + #deleteCategory, + [id], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override - _i5.Future editCategory(int? id, String? newName, String? newUnit) => - (super.noSuchMethod(Invocation.method(#editCategory, [id, newName, newUnit]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + _i5.Future editCategory( + int? id, + String? newName, + String? newUnit, + ) => + (super.noSuchMethod( + Invocation.method( + #editCategory, + [ + id, + newName, + newUnit, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override - _i5.Future addEntry(_i6.MeasurementEntry? entry) => - (super.noSuchMethod(Invocation.method(#addEntry, [entry]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + _i5.Future addEntry(_i6.MeasurementEntry? entry) => (super.noSuchMethod( + Invocation.method( + #addEntry, + [entry], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override - _i5.Future deleteEntry(int? id, int? categoryId) => - (super.noSuchMethod(Invocation.method(#deleteEntry, [id, categoryId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + _i5.Future deleteEntry( + int? id, + int? categoryId, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteEntry, + [ + id, + categoryId, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override _i5.Future editEntry( - int? id, int? categoryId, num? newValue, String? newNotes, DateTime? newDate) => + int? id, + int? categoryId, + num? newValue, + String? newNotes, + DateTime? newDate, + ) => (super.noSuchMethod( - Invocation.method(#editEntry, [id, categoryId, newValue, newNotes, newDate]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + Invocation.method( + #editEntry, + [ + id, + categoryId, + newValue, + newNotes, + newDate, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @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); + 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); + void notifyListeners() => 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 67ccb658..f80c3504 100644 --- a/test/measurements/measurement_provider_test.mocks.dart +++ b/test/measurements/measurement_provider_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.17 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in wger/test/measurements/measurement_provider_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'package:http/http.dart' as _i3; @@ -9,6 +10,7 @@ import 'package:mockito/mockito.dart' as _i1; import 'package:wger/providers/auth.dart' as _i2; import 'package:wger/providers/base_provider.dart' as _i4; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -17,14 +19,47 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeAuthProvider_0 extends _i1.Fake implements _i2.AuthProvider {} +class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { + _FakeAuthProvider_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_1 extends _i1.Fake implements _i3.Client {} +class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { + _FakeClient_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeUri_2 extends _i1.Fake implements Uri {} +class _FakeUri_2 extends _i1.SmartFake implements Uri { + _FakeUri_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeResponse_3 extends _i1.Fake implements _i3.Response {} +class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response { + _FakeResponse_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WgerBaseProvider]. /// @@ -35,41 +70,130 @@ 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( + this, + Invocation.getter(#auth), + ), + ) as _i2.AuthProvider); @override - set auth(_i2.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + set auth(_i2.AuthProvider? _auth) => 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( + this, + Invocation.getter(#client), + ), + ) as _i3.Client); @override - set client(_i3.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + set client(_i3.Client? _client) => 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, + }, + ), + returnValue: _FakeUri_2( + this, Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), - returnValue: _FakeUri_2()) as Uri); + #makeUrl, + [path], + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, + ), + ), + ) 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: + _i5.Future>.value({}), + ) as _i5.Future>); @override - _i5.Future> post(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) - as _i5.Future>); + _i5.Future> post( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #post, + [ + data, + uri, + ], + ), + returnValue: + _i5.Future>.value({}), + ) as _i5.Future>); @override - _i5.Future> patch(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) - as _i5.Future>); + _i5.Future> patch( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #patch, + [ + data, + uri, + ], + ), + returnValue: + _i5.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>); + _i5.Future<_i3.Response> deleteRequest( + String? url, + int? id, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( + this, + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + )), + ) as _i5.Future<_i3.Response>); } diff --git a/test/nutrition/nutritional_plan_form_test.mocks.dart b/test/nutrition/nutritional_plan_form_test.mocks.dart index b9f6dda4..2f70e7c5 100644 --- a/test/nutrition/nutritional_plan_form_test.mocks.dart +++ b/test/nutrition/nutritional_plan_form_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.17 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in wger/test/nutrition/nutritional_plan_form_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i9; import 'dart:ui' as _i10; @@ -14,6 +15,7 @@ import 'package:wger/models/nutrition/nutritional_plan.dart' as _i4; import 'package:wger/providers/auth.dart' as _i2; import 'package:wger/providers/nutrition.dart' as _i8; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -22,191 +24,558 @@ import 'package:wger/providers/nutrition.dart' as _i8; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeAuthProvider_0 extends _i1.Fake implements _i2.AuthProvider {} +class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { + _FakeAuthProvider_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_1 extends _i1.Fake implements _i3.Client {} +class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { + _FakeClient_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeNutritionalPlan_2 extends _i1.Fake implements _i4.NutritionalPlan {} +class _FakeNutritionalPlan_2 extends _i1.SmartFake + implements _i4.NutritionalPlan { + _FakeNutritionalPlan_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeMeal_3 extends _i1.Fake implements _i5.Meal {} +class _FakeMeal_3 extends _i1.SmartFake implements _i5.Meal { + _FakeMeal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeMealItem_4 extends _i1.Fake implements _i6.MealItem {} +class _FakeMealItem_4 extends _i1.SmartFake implements _i6.MealItem { + _FakeMealItem_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeIngredient_5 extends _i1.Fake implements _i7.Ingredient {} +class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient { + _FakeIngredient_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeUri_6 extends _i1.Fake implements Uri {} +class _FakeUri_6 extends _i1.SmartFake implements Uri { + _FakeUri_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeResponse_7 extends _i1.Fake implements _i3.Response {} +class _FakeResponse_7 extends _i1.SmartFake implements _i3.Response { + _FakeResponse_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// 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>); + List<_i4.NutritionalPlan> get items => (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( + this, + Invocation.getter(#auth), + ), + ) as _i2.AuthProvider); @override - set auth(_i2.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + set auth(_i2.AuthProvider? _auth) => 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( + this, + Invocation.getter(#client), + ), + ) as _i3.Client); @override - set client(_i3.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + set client(_i3.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + bool get hasListeners => (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); + _i4.NutritionalPlan findById(int? id) => (super.noSuchMethod( + Invocation.method( + #findById, + [id], + ), + returnValue: _FakeNutritionalPlan_2( + this, + Invocation.method( + #findById, + [id], + ), + ), + ) as _i4.NutritionalPlan); @override - _i5.Meal? findMealById(int? id) => - (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?); + _i5.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( + #findMealById, + [id], + )) as _i5.Meal?); @override - _i9.Future fetchAndSetAllPlansSparse() => - (super.noSuchMethod(Invocation.method(#fetchAndSetAllPlansSparse, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); + _i9.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllPlansSparse, + [], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i9.Future fetchAndSetAllPlansFull() => - (super.noSuchMethod(Invocation.method(#fetchAndSetAllPlansFull, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); + _i9.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllPlansFull, + [], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => - (super.noSuchMethod(Invocation.method(#fetchAndSetPlanSparse, [planId]), - returnValue: Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2())) - as _i9.Future<_i4.NutritionalPlan>); + (super.noSuchMethod( + Invocation.method( + #fetchAndSetPlanSparse, + [planId], + ), + returnValue: + _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( + this, + Invocation.method( + #fetchAndSetPlanSparse, + [planId], + ), + )), + ) 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())) - as _i9.Future<_i4.NutritionalPlan>); + (super.noSuchMethod( + Invocation.method( + #fetchAndSetPlanFull, + [planId], + ), + returnValue: + _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( + this, + Invocation.method( + #fetchAndSetPlanFull, + [planId], + ), + )), + ) 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())) - as _i9.Future<_i4.NutritionalPlan>); + (super.noSuchMethod( + Invocation.method( + #addPlan, + [planData], + ), + returnValue: + _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( + this, + Invocation.method( + #addPlan, + [planData], + ), + )), + ) as _i9.Future<_i4.NutritionalPlan>); @override - _i9.Future editPlan(_i4.NutritionalPlan? plan) => - (super.noSuchMethod(Invocation.method(#editPlan, [plan]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); + _i9.Future editPlan(_i4.NutritionalPlan? plan) => (super.noSuchMethod( + Invocation.method( + #editPlan, + [plan], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.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: _i9.Future.value(), + returnValueForMissingStub: _i9.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>); + _i9.Future<_i5.Meal> addMeal( + _i5.Meal? meal, + int? planId, + ) => + (super.noSuchMethod( + Invocation.method( + #addMeal, + [ + meal, + planId, + ], + ), + returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( + this, + Invocation.method( + #addMeal, + [ + meal, + planId, + ], + ), + )), + ) 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>); + _i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) => (super.noSuchMethod( + Invocation.method( + #editMeal, + [meal], + ), + returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( + this, + Invocation.method( + #editMeal, + [meal], + ), + )), + ) 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); + _i9.Future deleteMeal(_i5.Meal? meal) => (super.noSuchMethod( + Invocation.method( + #deleteMeal, + [meal], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _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>); + _i9.Future<_i6.MealItem> addMealItem( + _i6.MealItem? mealItem, + _i5.Meal? meal, + ) => + (super.noSuchMethod( + Invocation.method( + #addMealItem, + [ + mealItem, + meal, + ], + ), + returnValue: _i9.Future<_i6.MealItem>.value(_FakeMealItem_4( + this, + Invocation.method( + #addMealItem, + [ + mealItem, + meal, + ], + ), + )), + ) as _i9.Future<_i6.MealItem>); @override _i9.Future deleteMealItem(_i6.MealItem? mealItem) => - (super.noSuchMethod(Invocation.method(#deleteMealItem, [mealItem]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); + (super.noSuchMethod( + Invocation.method( + #deleteMealItem, + [mealItem], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override _i9.Future<_i7.Ingredient> fetchIngredient(int? ingredientId) => - (super.noSuchMethod(Invocation.method(#fetchIngredient, [ingredientId]), - returnValue: Future<_i7.Ingredient>.value(_FakeIngredient_5())) - as _i9.Future<_i7.Ingredient>); + (super.noSuchMethod( + Invocation.method( + #fetchIngredient, + [ingredientId], + ), + returnValue: _i9.Future<_i7.Ingredient>.value(_FakeIngredient_5( + this, + Invocation.method( + #fetchIngredient, + [ingredientId], + ), + )), + ) as _i9.Future<_i7.Ingredient>); @override - _i9.Future fetchIngredientsFromCache() => - (super.noSuchMethod(Invocation.method(#fetchIngredientsFromCache, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); + _i9.Future fetchIngredientsFromCache() => (super.noSuchMethod( + Invocation.method( + #fetchIngredientsFromCache, + [], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.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: _i9.Future>.value([]), + ) as _i9.Future>); @override _i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => - (super.noSuchMethod(Invocation.method(#searchIngredientWithCode, [code]), - returnValue: Future<_i7.Ingredient?>.value()) as _i9.Future<_i7.Ingredient?>); + (super.noSuchMethod( + Invocation.method( + #searchIngredientWithCode, + [code], + ), + returnValue: _i9.Future<_i7.Ingredient?>.value(), + ) as _i9.Future<_i7.Ingredient?>); @override - _i9.Future logMealToDiary(_i5.Meal? meal) => - (super.noSuchMethod(Invocation.method(#logMealToDiary, [meal]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); + _i9.Future logMealToDiary(_i5.Meal? meal) => (super.noSuchMethod( + Invocation.method( + #logMealToDiary, + [meal], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.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); + _i9.Future logIngredentToDiary( + _i6.MealItem? mealItem, + int? planId, [ + DateTime? dateTime, + ]) => + (super.noSuchMethod( + Invocation.method( + #logIngredentToDiary, + [ + mealItem, + planId, + dateTime, + ], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i9.Future deleteLog(int? logId, int? planId) => - (super.noSuchMethod(Invocation.method(#deleteLog, [logId, planId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); + _i9.Future deleteLog( + int? logId, + int? planId, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteLog, + [ + logId, + planId, + ], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => - (super.noSuchMethod(Invocation.method(#fetchAndSetLogs, [plan]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); - @override - Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => (super.noSuchMethod( + Invocation.method( + #fetchAndSetLogs, + [plan], + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.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_6( + this, Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), - returnValue: _FakeUri_6()) as Uri); + #makeUrl, + [path], + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, + ), + ), + ) 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: + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i9.Future> post(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) - as _i9.Future>); + _i9.Future> post( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #post, + [ + data, + uri, + ], + ), + returnValue: + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i9.Future> patch(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) - as _i9.Future>); + _i9.Future> patch( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #patch, + [ + data, + uri, + ], + ), + returnValue: + _i9.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>); + _i9.Future<_i3.Response> deleteRequest( + String? url, + int? id, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + returnValue: _i9.Future<_i3.Response>.value(_FakeResponse_7( + this, + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + )), + ) as _i9.Future<_i3.Response>); @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); + 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); + void notifyListeners() => 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 59ccffaa..5483f2a0 100644 --- a/test/other/base_provider_test.mocks.dart +++ b/test/other/base_provider_test.mocks.dart @@ -1,17 +1,16 @@ -// Mocks generated by Mockito 5.0.17 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in wger/test/other/base_provider_test.dart. // Do not manually edit this file. -import 'dart:async' as _i5; -import 'dart:convert' as _i6; -import 'dart:typed_data' as _i7; +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; +import 'dart:convert' as _i4; +import 'dart:typed_data' as _i5; -import 'package:http/src/base_request.dart' as _i8; -import 'package:http/src/client.dart' as _i4; -import 'package:http/src/response.dart' as _i2; -import 'package:http/src/streamed_response.dart' as _i3; +import 'package:http/http.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -20,65 +19,245 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeResponse_0 extends _i1.Fake implements _i2.Response {} +class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { + _FakeResponse_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeStreamedResponse_1 extends _i1.Fake implements _i3.StreamedResponse {} +class _FakeStreamedResponse_1 extends _i1.SmartFake + implements _i2.StreamedResponse { + _FakeStreamedResponse_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Client]. /// /// See the documentation for Mockito's code generation for more information. -class MockClient extends _i1.Mock implements _i4.Client { +class MockClient extends _i1.Mock implements _i2.Client { MockClient() { _i1.throwOnMissingStub(this); } @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>); - @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>); - @override - _i5.Future<_i2.Response> post(Uri? url, - {Map? headers, Object? body, _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> head( + Uri? url, { + Map? headers, + }) => (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( + #head, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #head, + [url], + {#headers: headers}, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> put(Uri? url, - {Map? headers, Object? body, _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> get( + Uri? url, { + Map? headers, + }) => (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( + #get, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #get, + [url], + {#headers: headers}, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> patch(Uri? url, - {Map? headers, Object? body, _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> post( + Uri? url, { + Map? headers, + Object? body, + _i4.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( + #post, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #post, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> delete(Uri? url, - {Map? headers, Object? body, _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> put( + Uri? url, { + Map? headers, + Object? body, + _i4.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( + #put, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #put, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.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); + _i3.Future<_i2.Response> patch( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => + (super.noSuchMethod( + Invocation.method( + #patch, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #patch, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @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>); + _i3.Future<_i2.Response> delete( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => + (super.noSuchMethod( + Invocation.method( + #delete, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i3.StreamedResponse> send(_i8.BaseRequest? request) => - (super.noSuchMethod(Invocation.method(#send, [request]), - returnValue: Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_1())) - as _i5.Future<_i3.StreamedResponse>); + _i3.Future read( + Uri? url, { + Map? headers, + }) => + (super.noSuchMethod( + Invocation.method( + #read, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future.value(''), + ) as _i3.Future); @override - void close() => - super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null); + _i3.Future<_i5.Uint8List> readBytes( + Uri? url, { + Map? headers, + }) => + (super.noSuchMethod( + Invocation.method( + #readBytes, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i5.Uint8List>.value(_i5.Uint8List(0)), + ) as _i3.Future<_i5.Uint8List>); + @override + _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method( + #send, + [request], + ), + returnValue: + _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( + this, + Invocation.method( + #send, + [request], + ), + )), + ) as _i3.Future<_i2.StreamedResponse>); + @override + void close() => super.noSuchMethod( + Invocation.method( + #close, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/workout/workout_form_test.mocks.dart b/test/workout/workout_form_test.mocks.dart index 26464a9a..a258a843 100644 --- a/test/workout/workout_form_test.mocks.dart +++ b/test/workout/workout_form_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.17 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in wger/test/workout/workout_form_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i13; import 'dart:ui' as _i15; @@ -19,6 +20,7 @@ import 'package:wger/models/workouts/workout_plan.dart' as _i6; import 'package:wger/providers/auth.dart' as _i4; import 'package:wger/providers/workout_plans.dart' as _i12; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -27,245 +29,679 @@ import 'package:wger/providers/workout_plans.dart' as _i12; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeWeightUnit_0 extends _i1.Fake implements _i2.WeightUnit {} +class _FakeWeightUnit_0 extends _i1.SmartFake implements _i2.WeightUnit { + _FakeWeightUnit_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeRepetitionUnit_1 extends _i1.Fake implements _i3.RepetitionUnit {} +class _FakeRepetitionUnit_1 extends _i1.SmartFake + implements _i3.RepetitionUnit { + _FakeRepetitionUnit_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeAuthProvider_2 extends _i1.Fake implements _i4.AuthProvider {} +class _FakeAuthProvider_2 extends _i1.SmartFake implements _i4.AuthProvider { + _FakeAuthProvider_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_3 extends _i1.Fake implements _i5.Client {} +class _FakeClient_3 extends _i1.SmartFake implements _i5.Client { + _FakeClient_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWorkoutPlan_4 extends _i1.Fake implements _i6.WorkoutPlan {} +class _FakeWorkoutPlan_4 extends _i1.SmartFake implements _i6.WorkoutPlan { + _FakeWorkoutPlan_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDay_5 extends _i1.Fake implements _i7.Day {} +class _FakeDay_5 extends _i1.SmartFake implements _i7.Day { + _FakeDay_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeSet_6 extends _i1.Fake implements _i8.Set {} +class _FakeSet_6 extends _i1.SmartFake implements _i8.Set { + _FakeSet_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeSetting_7 extends _i1.Fake implements _i9.Setting {} +class _FakeSetting_7 extends _i1.SmartFake implements _i9.Setting { + _FakeSetting_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWorkoutSession_8 extends _i1.Fake implements _i10.WorkoutSession {} +class _FakeWorkoutSession_8 extends _i1.SmartFake + implements _i10.WorkoutSession { + _FakeWorkoutSession_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeLog_9 extends _i1.Fake implements _i11.Log {} +class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { + _FakeLog_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeUri_10 extends _i1.Fake implements Uri {} +class _FakeUri_10 extends _i1.SmartFake implements Uri { + _FakeUri_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeResponse_11 extends _i1.Fake implements _i5.Response {} +class _FakeResponse_11 extends _i1.SmartFake implements _i5.Response { + _FakeResponse_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// 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>); + List<_i6.WorkoutPlan> get items => (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>); + List<_i2.WeightUnit> get weightUnits => (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); + _i2.WeightUnit get defaultWeightUnit => (super.noSuchMethod( + Invocation.getter(#defaultWeightUnit), + returnValue: _FakeWeightUnit_0( + this, + Invocation.getter(#defaultWeightUnit), + ), + ) as _i2.WeightUnit); @override - List<_i3.RepetitionUnit> get repetitionUnits => - (super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i3.RepetitionUnit>[]) - as List<_i3.RepetitionUnit>); + List<_i3.RepetitionUnit> get repetitionUnits => (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); + _i3.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( + Invocation.getter(#defaultRepetitionUnit), + returnValue: _FakeRepetitionUnit_1( + this, + Invocation.getter(#defaultRepetitionUnit), + ), + ) 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( + this, + Invocation.getter(#auth), + ), + ) as _i4.AuthProvider); @override - set auth(_i4.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + set auth(_i4.AuthProvider? _auth) => 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( + this, + Invocation.getter(#client), + ), + ) as _i5.Client); @override - set client(_i5.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + set client(_i5.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + bool get hasListeners => (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); + _i6.WorkoutPlan findById(int? id) => (super.noSuchMethod( + Invocation.method( + #findById, + [id], + ), + returnValue: _FakeWorkoutPlan_4( + this, + Invocation.method( + #findById, + [id], + ), + ), + ) 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); + void setCurrentPlan(int? id) => super.noSuchMethod( + Invocation.method( + #setCurrentPlan, + [id], + ), + returnValueForMissingStub: null, + ); @override - void resetCurrentPlan() => - super.noSuchMethod(Invocation.method(#resetCurrentPlan, []), returnValueForMissingStub: null); + void resetCurrentPlan() => 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: _i13.Future.value(), + returnValueForMissingStub: _i13.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: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); @override _i13.Future<_i6.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => - (super.noSuchMethod(Invocation.method(#fetchAndSetPlanSparse, [planId]), - returnValue: Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan_4())) - as _i13.Future<_i6.WorkoutPlan>); + (super.noSuchMethod( + Invocation.method( + #fetchAndSetPlanSparse, + [planId], + ), + returnValue: _i13.Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan_4( + this, + Invocation.method( + #fetchAndSetPlanSparse, + [planId], + ), + )), + ) as _i13.Future<_i6.WorkoutPlan>); @override _i13.Future<_i6.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => - (super.noSuchMethod(Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]), - returnValue: Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan_4())) - as _i13.Future<_i6.WorkoutPlan>); + (super.noSuchMethod( + Invocation.method( + #fetchAndSetWorkoutPlanFull, + [workoutId], + ), + returnValue: _i13.Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan_4( + this, + Invocation.method( + #fetchAndSetWorkoutPlanFull, + [workoutId], + ), + )), + ) as _i13.Future<_i6.WorkoutPlan>); @override _i13.Future<_i6.WorkoutPlan> addWorkout(_i6.WorkoutPlan? workout) => - (super.noSuchMethod(Invocation.method(#addWorkout, [workout]), - returnValue: Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan_4())) - as _i13.Future<_i6.WorkoutPlan>); + (super.noSuchMethod( + Invocation.method( + #addWorkout, + [workout], + ), + returnValue: _i13.Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan_4( + this, + Invocation.method( + #addWorkout, + [workout], + ), + )), + ) as _i13.Future<_i6.WorkoutPlan>); @override _i13.Future editWorkout(_i6.WorkoutPlan? workout) => - (super.noSuchMethod(Invocation.method(#editWorkout, [workout]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + (super.noSuchMethod( + Invocation.method( + #editWorkout, + [workout], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.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: _i13.Future.value(), + returnValueForMissingStub: _i13.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({})) - as _i13.Future>); + _i6.WorkoutPlan? workout, + _i14.Exercise? exercise, + ) => + (super.noSuchMethod( + Invocation.method( + #fetchLogData, + [ + workout, + exercise, + ], + ), + returnValue: + _i13.Future>.value({}), + ) as _i13.Future>); @override - _i13.Future fetchAndSetRepetitionUnits() => - (super.noSuchMethod(Invocation.method(#fetchAndSetRepetitionUnits, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); @override - _i13.Future fetchAndSetWeightUnits() => - (super.noSuchMethod(Invocation.method(#fetchAndSetWeightUnits, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); @override - _i13.Future fetchAndSetUnits() => - (super.noSuchMethod(Invocation.method(#fetchAndSetUnits, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i13.Future); + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetUnits, + [], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.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>); + _i13.Future<_i7.Day> addDay( + _i7.Day? day, + _i6.WorkoutPlan? workout, + ) => + (super.noSuchMethod( + Invocation.method( + #addDay, + [ + day, + workout, + ], + ), + returnValue: _i13.Future<_i7.Day>.value(_FakeDay_5( + this, + Invocation.method( + #addDay, + [ + day, + workout, + ], + ), + )), + ) 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); + _i13.Future editDay(_i7.Day? day) => (super.noSuchMethod( + Invocation.method( + #editDay, + [day], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.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 deleteDay(_i7.Day? day) => (super.noSuchMethod( + Invocation.method( + #deleteDay, + [day], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.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>); + _i13.Future<_i8.Set> addSet(_i8.Set? workoutSet) => (super.noSuchMethod( + Invocation.method( + #addSet, + [workoutSet], + ), + returnValue: _i13.Future<_i8.Set>.value(_FakeSet_6( + this, + Invocation.method( + #addSet, + [workoutSet], + ), + )), + ) 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: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); @override - _i13.Future> reorderSets(List<_i8.Set>? sets, int? startIndex) => - (super.noSuchMethod(Invocation.method(#reorderSets, [sets, startIndex]), - returnValue: Future>.value(<_i8.Set>[])) as _i13.Future>); + _i13.Future> reorderSets( + List<_i8.Set>? sets, + int? startIndex, + ) => + (super.noSuchMethod( + Invocation.method( + #reorderSets, + [ + sets, + startIndex, + ], + ), + returnValue: _i13.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); + (super.noSuchMethod( + Invocation.method( + #fetchComputedSettings, + [workoutSet], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); @override - _i13.Future fetchSmartText(_i8.Set? workoutSet, _i14.Exercise? exercise) => - (super.noSuchMethod(Invocation.method(#fetchSmartText, [workoutSet, exercise]), - returnValue: Future.value('')) as _i13.Future); + _i13.Future fetchSmartText( + _i8.Set? workoutSet, + _i14.Exercise? exercise, + ) => + (super.noSuchMethod( + Invocation.method( + #fetchSmartText, + [ + workoutSet, + exercise, + ], + ), + returnValue: _i13.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: _i13.Future.value(), + returnValueForMissingStub: _i13.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>); + (super.noSuchMethod( + Invocation.method( + #addSetting, + [workoutSetting], + ), + returnValue: _i13.Future<_i9.Setting>.value(_FakeSetting_7( + this, + Invocation.method( + #addSetting, + [workoutSetting], + ), + )), + ) as _i13.Future<_i9.Setting>); @override - _i13.Future fetchSessionData() => - (super.noSuchMethod(Invocation.method(#fetchSessionData, []), - returnValue: Future.value()) as _i13.Future); + _i13.Future fetchSessionData() => (super.noSuchMethod( + Invocation.method( + #fetchSessionData, + [], + ), + returnValue: _i13.Future.value(), + ) as _i13.Future); @override _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => - (super.noSuchMethod(Invocation.method(#addSession, [session]), - 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>); - @override - _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}) => (super.noSuchMethod( + Invocation.method( + #addSession, + [session], + ), + returnValue: + _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( + this, Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), - returnValue: _FakeUri_10()) as Uri); + #addSession, + [session], + ), + )), + ) as _i13.Future<_i10.WorkoutSession>); @override - _i13.Future> fetch(Uri? uri) => - (super.noSuchMethod(Invocation.method(#fetch, [uri]), - returnValue: Future>.value({})) - as _i13.Future>); + _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( + Invocation.method( + #addLog, + [log], + ), + returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( + this, + Invocation.method( + #addLog, + [log], + ), + )), + ) as _i13.Future<_i11.Log>); @override - _i13.Future> post(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) - as _i13.Future>); + _i13.Future deleteLog(_i11.Log? log) => (super.noSuchMethod( + Invocation.method( + #deleteLog, + [log], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); @override - _i13.Future> patch(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) - as _i13.Future>); + Uri makeUrl( + String? path, { + int? id, + String? objectMethod, + Map? query, + }) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, + ), + returnValue: _FakeUri_10( + this, + Invocation.method( + #makeUrl, + [path], + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, + ), + ), + ) as Uri); @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> fetch(Uri? uri) => (super.noSuchMethod( + Invocation.method( + #fetch, + [uri], + ), + returnValue: + _i13.Future>.value({}), + ) as _i13.Future>); @override - void addListener(_i15.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); + _i13.Future> post( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #post, + [ + data, + uri, + ], + ), + returnValue: + _i13.Future>.value({}), + ) as _i13.Future>); @override - void removeListener(_i15.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); + _i13.Future> patch( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #patch, + [ + data, + uri, + ], + ), + returnValue: + _i13.Future>.value({}), + ) as _i13.Future>); @override - void dispose() => - super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); + _i13.Future<_i5.Response> deleteRequest( + String? url, + int? id, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + returnValue: _i13.Future<_i5.Response>.value(_FakeResponse_11( + this, + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + )), + ) as _i13.Future<_i5.Response>); @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), 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, + ); + @override + void notifyListeners() => 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 21519f28..1d0e4f07 100644 --- a/test/workout/workout_set_form_test.mocks.dart +++ b/test/workout/workout_set_form_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.17 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in wger/test/workout/workout_set_form_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i7; @@ -11,6 +12,7 @@ import 'package:wger/models/exercises/exercise.dart' as _i4; import 'package:wger/providers/auth.dart' as _i2; import 'package:wger/providers/exercises.dart' as _i5; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references @@ -19,16 +21,57 @@ import 'package:wger/providers/exercises.dart' as _i5; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeAuthProvider_0 extends _i1.Fake implements _i2.AuthProvider {} +class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider { + _FakeAuthProvider_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_1 extends _i1.Fake implements _i3.Client {} +class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { + _FakeClient_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeExercise_2 extends _i1.Fake implements _i4.Exercise {} +class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise { + _FakeExercise_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeUri_3 extends _i1.Fake implements Uri {} +class _FakeUri_3 extends _i1.SmartFake implements Uri { + _FakeUri_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeResponse_4 extends _i1.Fake implements _i3.Response {} +class _FakeResponse_4 extends _i1.SmartFake implements _i3.Response { + _FakeResponse_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ExercisesProvider]. /// @@ -39,93 +82,261 @@ 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( + this, + Invocation.getter(#auth), + ), + ) as _i2.AuthProvider); @override - set auth(_i2.AuthProvider? _auth) => - super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null); + set auth(_i2.AuthProvider? _auth) => 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( + this, + Invocation.getter(#client), + ), + ) as _i3.Client); @override - set client(_i3.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null); + set client(_i3.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + bool get hasListeners => (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( + this, + Invocation.method( + #findById, + [exerciseId], + ), + ), + ) as _i4.Exercise); @override - _i6.Future fetchAndSetCategories() => - (super.noSuchMethod(Invocation.method(#fetchAndSetCategories, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + _i6.Future fetchAndSetCategories() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetCategories, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future fetchAndSetMuscles() => - (super.noSuchMethod(Invocation.method(#fetchAndSetMuscles, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + _i6.Future fetchAndSetMuscles() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetMuscles, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future fetchAndSetEquipment() => - (super.noSuchMethod(Invocation.method(#fetchAndSetEquipment, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + _i6.Future fetchAndSetEquipment() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetEquipment, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @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>); - @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}) => (super.noSuchMethod( + Invocation.method( + #fetchAndSetExercise, + [exerciseId], + ), + returnValue: _i6.Future<_i4.Exercise>.value(_FakeExercise_2( + this, Invocation.method( - #makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}), - returnValue: _FakeUri_3()) as Uri); + #fetchAndSetExercise, + [exerciseId], + ), + )), + ) as _i6.Future<_i4.Exercise>); @override - _i6.Future> fetch(Uri? uri) => - (super.noSuchMethod(Invocation.method(#fetch, [uri]), - returnValue: Future>.value({})) - as _i6.Future>); + _i6.Future checkExerciseCacheVersion() => (super.noSuchMethod( + Invocation.method( + #checkExerciseCacheVersion, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future> post(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#post, [data, uri]), - returnValue: Future>.value({})) - as _i6.Future>); + _i6.Future fetchAndSetExercises() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetExercises, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future> patch(Map? data, Uri? uri) => - (super.noSuchMethod(Invocation.method(#patch, [data, uri]), - returnValue: Future>.value({})) - as _i6.Future>); + _i6.Future> searchExercise( + String? name, [ + String? languageCode = r'en', + ]) => + (super.noSuchMethod( + Invocation.method( + #searchExercise, + [ + name, + languageCode, + ], + ), + returnValue: _i6.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>); + 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( + this, + Invocation.method( + #makeUrl, + [path], + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, + ), + ), + ) as Uri); @override - void addListener(_i7.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); + _i6.Future> fetch(Uri? uri) => (super.noSuchMethod( + Invocation.method( + #fetch, + [uri], + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override - void removeListener(_i7.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); + _i6.Future> post( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #post, + [ + data, + uri, + ], + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override - void dispose() => - super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); + _i6.Future> patch( + Map? data, + Uri? uri, + ) => + (super.noSuchMethod( + Invocation.method( + #patch, + [ + data, + uri, + ], + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null); + _i6.Future<_i3.Response> deleteRequest( + String? url, + int? id, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #deleteRequest, + [ + url, + id, + ], + ), + )), + ) as _i6.Future<_i3.Response>); + @override + 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, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } From 67003a520aad3aa1ec4855490b929004dd72af54 Mon Sep 17 00:00:00 2001 From: Vinod Date: Sun, 2 Oct 2022 11:57:13 +0530 Subject: [PATCH 06/15] added .vscode .gitignore --- .gitignore | 3 ++- .vscode/settings.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 08fb3709..1f7b1011 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ # The .vscode folder contains launch configuration and tasks you configure in # VS Code which you may wish to be included in version control, so this line # is commented out by default. -#.vscode/ +.vscode/ # Flutter/Dart/Pub related **/doc/api/ @@ -31,6 +31,7 @@ .pub/ /build/ + # Web related lib/generated_plugin_registrant.dart diff --git a/.vscode/settings.json b/.vscode/settings.json index 074f5899..a6032c70 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "dart.lineLength": 100 + "dart.lineLength": 100, + "diffEditor.ignoreTrimWhitespace": true, } \ No newline at end of file From 408e71dd2d7e361cd7c155561e423472302745b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 01:06:46 +0000 Subject: [PATCH 07/15] Bump json_serializable from 6.4.0 to 6.4.1 Bumps [json_serializable](https://github.com/google/json_serializable.dart) from 6.4.0 to 6.4.1. - [Release notes](https://github.com/google/json_serializable.dart/releases) - [Commits](https://github.com/google/json_serializable.dart/compare/json_serializable-v6.4.0...json_serializable-v6.4.1) --- updated-dependencies: - dependency-name: json_serializable dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 4d4de47e..9c96eabc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -552,7 +552,7 @@ packages: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "6.4.0" + version: "6.4.1" klizma: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a7a393b3..86f2f354 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,7 +62,7 @@ dev_dependencies: # sdk: flutter build_runner: ^2.2.1 flutter_launcher_icons: ^0.10.0 - json_serializable: ^6.3.2 + json_serializable: ^6.4.1 mockito: ^5.3.2 network_image_mock: ^2.1.1 flutter_lints: ^2.0.1 From 766a90994b9c7cd5b241032acc909abaaca4f589 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 01:07:11 +0000 Subject: [PATCH 08/15] Bump url_launcher from 6.1.5 to 6.1.6 Bumps [url_launcher](https://github.com/flutter/plugins/tree/main/packages/url_launcher) from 6.1.5 to 6.1.6. - [Release notes](https://github.com/flutter/plugins/releases) - [Commits](https://github.com/flutter/plugins/commits/url_launcher-v6.1.6/packages/url_launcher) --- updated-dependencies: - dependency-name: url_launcher dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 4d4de47e..d3163580 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -956,7 +956,7 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.1.5" + version: "6.1.6" url_launcher_android: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a7a393b3..71be6316 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -51,7 +51,7 @@ dependencies: rive: ^0.9.1 shared_preferences: ^2.0.15 table_calendar: ^3.0.7 - url_launcher: ^6.1.5 + url_launcher: ^6.1.6 flutter_barcode_scanner: ^2.0.0 video_player: ^2.4.7 From 8ee9aaab52adea78de34ee2df8b28545f761b245 Mon Sep 17 00:00:00 2001 From: Github-actions Date: Tue, 4 Oct 2022 15:02:56 +0000 Subject: [PATCH 09/15] Automatic linting --- lib/models/nutrition/nutritional_values.dart | 4 ++-- lib/models/workouts/log.dart | 3 +-- pubspec.lock | 24 ++++++++++---------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/lib/models/nutrition/nutritional_values.dart b/lib/models/nutrition/nutritional_values.dart index 56251ca5..834dcbb2 100644 --- a/lib/models/nutrition/nutritional_values.dart +++ b/lib/models/nutrition/nutritional_values.dart @@ -91,8 +91,8 @@ class NutritionalValues { @override //ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hash(energy, protein, carbohydrates, - carbohydratesSugar, fat, fatSaturated, fibres, sodium); + int get hashCode => Object.hash( + energy, protein, carbohydrates, carbohydratesSugar, fat, fatSaturated, fibres, sodium); } class BaseNutritionalValues { diff --git a/lib/models/workouts/log.dart b/lib/models/workouts/log.dart index edcdd588..c6020396 100644 --- a/lib/models/workouts/log.dart +++ b/lib/models/workouts/log.dart @@ -133,8 +133,7 @@ class Log { @override //ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hash( - exerciseId, weight, weightUnitId, reps, repetitionUnitId, rir); + int get hashCode => Object.hash(exerciseId, weight, weightUnitId, reps, repetitionUnitId, rir); //@override //int get hashCode => super.hashCode; diff --git a/pubspec.lock b/pubspec.lock index 62db1185..07c1a066 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,7 +42,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.9.0" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -154,7 +154,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.0" charcode: dependency: transitive description: @@ -217,7 +217,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.0" code_builder: dependency: transitive description: @@ -287,7 +287,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.0" ffi: dependency: transitive description: @@ -594,21 +594,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.12" + version: "0.12.11" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.5" + version: "0.1.4" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.7.0" mime: dependency: transitive description: @@ -664,7 +664,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.8.1" path_drawing: dependency: transitive description: @@ -879,7 +879,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.9.0" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -907,7 +907,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.0" table_calendar: dependency: "direct main" description: @@ -921,14 +921,14 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.12" + version: "0.4.9" timing: dependency: transitive description: From 134cd73e62dc9d556c5d2442a9fbd9a74ab1b1e5 Mon Sep 17 00:00:00 2001 From: Github-actions Date: Tue, 4 Oct 2022 15:12:12 +0000 Subject: [PATCH 10/15] Automatic linting --- lib/models/body_weight/weight_entry.g.dart | 3 +- lib/models/exercises/category.g.dart | 3 +- lib/models/exercises/exercise.g.dart | 6 +-- lib/models/exercises/image.g.dart | 3 +- .../measurements/measurement_category.g.dart | 4 +- .../measurements/measurement_entry.g.dart | 3 +- lib/models/nutrition/ingredient.g.dart | 3 +- .../nutrition/ingredient_weight_unit.g.dart | 6 +-- lib/models/nutrition/log.g.dart | 9 +--- lib/models/nutrition/nutritional_plan.g.dart | 3 +- lib/models/nutrition/weight_unit.g.dart | 3 +- lib/models/workouts/repetition_unit.g.dart | 3 +- lib/models/workouts/session.g.dart | 12 +---- lib/models/workouts/weight_unit.g.dart | 3 +- lib/models/workouts/workout_plan.g.dart | 3 +- test/gallery/gallery_screen_test.mocks.dart | 9 ++-- ...surement_categories_screen_test.mocks.dart | 12 ++--- .../measurement_provider_test.mocks.dart | 9 ++-- .../nutritional_plan_form_test.mocks.dart | 45 +++++++------------ test/other/base_provider_test.mocks.dart | 9 ++-- test/workout/workout_form_test.mocks.dart | 45 +++++++------------ test/workout/workout_set_form_test.mocks.dart | 12 ++--- 22 files changed, 65 insertions(+), 143 deletions(-) diff --git a/lib/models/body_weight/weight_entry.g.dart b/lib/models/body_weight/weight_entry.g.dart index 60ee02c9..d1152d20 100644 --- a/lib/models/body_weight/weight_entry.g.dart +++ b/lib/models/body_weight/weight_entry.g.dart @@ -18,8 +18,7 @@ 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 19383107..915120d1 100644 --- a/lib/models/exercises/category.g.dart +++ b/lib/models/exercises/category.g.dart @@ -17,8 +17,7 @@ ExerciseCategory _$ExerciseCategoryFromJson(Map json) { ); } -Map _$ExerciseCategoryToJson(ExerciseCategory instance) => - { +Map _$ExerciseCategoryToJson(ExerciseCategory instance) => { 'id': instance.id, 'name': instance.name, }; diff --git a/lib/models/exercises/exercise.g.dart b/lib/models/exercises/exercise.g.dart index 614ff9b2..68183089 100644 --- a/lib/models/exercises/exercise.g.dart +++ b/lib/models/exercises/exercise.g.dart @@ -48,8 +48,7 @@ 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) => { @@ -60,8 +59,7 @@ 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(), 'videos': instance.videos.map((e) => e.toJson()).toList(), diff --git a/lib/models/exercises/image.g.dart b/lib/models/exercises/image.g.dart index 1240dc38..6ef7c62e 100644 --- a/lib/models/exercises/image.g.dart +++ b/lib/models/exercises/image.g.dart @@ -20,8 +20,7 @@ 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/measurements/measurement_category.g.dart b/lib/models/measurements/measurement_category.g.dart index ef4ebcd3..eb887b2e 100644 --- a/lib/models/measurements/measurement_category.g.dart +++ b/lib/models/measurements/measurement_category.g.dart @@ -22,9 +22,7 @@ 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 4b096960..7f6e346a 100644 --- a/lib/models/measurements/measurement_entry.g.dart +++ b/lib/models/measurements/measurement_entry.g.dart @@ -20,8 +20,7 @@ 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 eaace92b..28dfe637 100644 --- a/lib/models/nutrition/ingredient.g.dart +++ b/lib/models/nutrition/ingredient.g.dart @@ -40,8 +40,7 @@ Ingredient _$IngredientFromJson(Map json) { ); } -Map _$IngredientToJson(Ingredient instance) => - { +Map _$IngredientToJson(Ingredient instance) => { 'id': instance.id, 'code': instance.code, 'name': instance.name, diff --git a/lib/models/nutrition/ingredient_weight_unit.g.dart b/lib/models/nutrition/ingredient_weight_unit.g.dart index 74b1f101..f147a2ee 100644 --- a/lib/models/nutrition/ingredient_weight_unit.g.dart +++ b/lib/models/nutrition/ingredient_weight_unit.g.dart @@ -13,16 +13,14 @@ IngredientWeightUnit _$IngredientWeightUnitFromJson(Map json) { ); 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 39068768..61690155 100644 --- a/lib/models/nutrition/log.g.dart +++ b/lib/models/nutrition/log.g.dart @@ -9,14 +9,7 @@ part of 'log.dart'; Log _$LogFromJson(Map json) { $checkKeys( json, - requiredKeys: const [ - 'id', - 'plan', - 'datetime', - 'ingredient', - 'weight_unit', - 'amount' - ], + requiredKeys: const ['id', 'plan', 'datetime', 'ingredient', 'weight_unit', 'amount'], ); return Log( id: json['id'] as int?, diff --git a/lib/models/nutrition/nutritional_plan.g.dart b/lib/models/nutrition/nutritional_plan.g.dart index 9b10d8a5..661a9f47 100644 --- a/lib/models/nutrition/nutritional_plan.g.dart +++ b/lib/models/nutrition/nutritional_plan.g.dart @@ -18,8 +18,7 @@ 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 74e1f0cf..6f2b9607 100644 --- a/lib/models/nutrition/weight_unit.g.dart +++ b/lib/models/nutrition/weight_unit.g.dart @@ -17,8 +17,7 @@ WeightUnit _$WeightUnitFromJson(Map json) { ); } -Map _$WeightUnitToJson(WeightUnit instance) => - { +Map _$WeightUnitToJson(WeightUnit instance) => { 'id': instance.id, 'name': instance.name, }; diff --git a/lib/models/workouts/repetition_unit.g.dart b/lib/models/workouts/repetition_unit.g.dart index 115dc338..33e6a815 100644 --- a/lib/models/workouts/repetition_unit.g.dart +++ b/lib/models/workouts/repetition_unit.g.dart @@ -17,8 +17,7 @@ RepetitionUnit _$RepetitionUnitFromJson(Map json) { ); } -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 e16affad..79f4fee4 100644 --- a/lib/models/workouts/session.g.dart +++ b/lib/models/workouts/session.g.dart @@ -9,14 +9,7 @@ part of 'session.dart'; WorkoutSession _$WorkoutSessionFromJson(Map json) { $checkKeys( json, - requiredKeys: const [ - 'id', - 'workout', - 'date', - 'impression', - 'time_start', - 'time_end' - ], + requiredKeys: const ['id', 'workout', 'date', 'impression', 'time_start', 'time_end'], ); return WorkoutSession() ..id = json['id'] as int? @@ -28,8 +21,7 @@ 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/weight_unit.g.dart b/lib/models/workouts/weight_unit.g.dart index 74e1f0cf..6f2b9607 100644 --- a/lib/models/workouts/weight_unit.g.dart +++ b/lib/models/workouts/weight_unit.g.dart @@ -17,8 +17,7 @@ WeightUnit _$WeightUnitFromJson(Map json) { ); } -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 ef156e3e..ac1d6fa9 100644 --- a/lib/models/workouts/workout_plan.g.dart +++ b/lib/models/workouts/workout_plan.g.dart @@ -19,8 +19,7 @@ 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/test/gallery/gallery_screen_test.mocks.dart b/test/gallery/gallery_screen_test.mocks.dart index 608c747a..def9b0cb 100644 --- a/test/gallery/gallery_screen_test.mocks.dart +++ b/test/gallery/gallery_screen_test.mocks.dart @@ -216,8 +216,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { #fetch, [uri], ), - returnValue: - _i6.Future>.value({}), + returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override _i6.Future> post( @@ -232,8 +231,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { uri, ], ), - returnValue: - _i6.Future>.value({}), + returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override _i6.Future> patch( @@ -248,8 +246,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { uri, ], ), - returnValue: - _i6.Future>.value({}), + returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override _i6.Future<_i3.Response> deleteRequest( diff --git a/test/measurements/measurement_categories_screen_test.mocks.dart b/test/measurements/measurement_categories_screen_test.mocks.dart index eab13e15..9eda4a2f 100644 --- a/test/measurements/measurement_categories_screen_test.mocks.dart +++ b/test/measurements/measurement_categories_screen_test.mocks.dart @@ -23,8 +23,7 @@ import 'package:wger/providers/measurement.dart' as _i4; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeWgerBaseProvider_0 extends _i1.SmartFake - implements _i2.WgerBaseProvider { +class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider { _FakeWgerBaseProvider_0( Object parent, Invocation parentInvocation, @@ -34,8 +33,7 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake ); } -class _FakeMeasurementCategory_1 extends _i1.SmartFake - implements _i3.MeasurementCategory { +class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory { _FakeMeasurementCategory_1( Object parent, Invocation parentInvocation, @@ -48,8 +46,7 @@ class _FakeMeasurementCategory_1 extends _i1.SmartFake /// 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); } @@ -122,8 +119,7 @@ class MockMeasurementProvider extends _i1.Mock returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override - _i5.Future addCategory(_i3.MeasurementCategory? category) => - (super.noSuchMethod( + _i5.Future addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod( Invocation.method( #addCategory, [category], diff --git a/test/measurements/measurement_provider_test.mocks.dart b/test/measurements/measurement_provider_test.mocks.dart index f80c3504..618e77fe 100644 --- a/test/measurements/measurement_provider_test.mocks.dart +++ b/test/measurements/measurement_provider_test.mocks.dart @@ -137,8 +137,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { #fetch, [uri], ), - returnValue: - _i5.Future>.value({}), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> post( @@ -153,8 +152,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { uri, ], ), - returnValue: - _i5.Future>.value({}), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future> patch( @@ -169,8 +167,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { uri, ], ), - returnValue: - _i5.Future>.value({}), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override _i5.Future<_i3.Response> deleteRequest( diff --git a/test/nutrition/nutritional_plan_form_test.mocks.dart b/test/nutrition/nutritional_plan_form_test.mocks.dart index 2f70e7c5..6c0626a6 100644 --- a/test/nutrition/nutritional_plan_form_test.mocks.dart +++ b/test/nutrition/nutritional_plan_form_test.mocks.dart @@ -46,8 +46,7 @@ class _FakeClient_1 extends _i1.SmartFake implements _i3.Client { ); } -class _FakeNutritionalPlan_2 extends _i1.SmartFake - implements _i4.NutritionalPlan { +class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan { _FakeNutritionalPlan_2( Object parent, Invocation parentInvocation, @@ -110,8 +109,7 @@ class _FakeResponse_7 extends _i1.SmartFake 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); } @@ -204,14 +202,12 @@ class MockNutritionPlansProvider extends _i1.Mock returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => - (super.noSuchMethod( + _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( Invocation.method( #fetchAndSetPlanSparse, [planId], ), - returnValue: - _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( + returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( this, Invocation.method( #fetchAndSetPlanSparse, @@ -220,14 +216,12 @@ class MockNutritionPlansProvider extends _i1.Mock )), ) as _i9.Future<_i4.NutritionalPlan>); @override - _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => - (super.noSuchMethod( + _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( Invocation.method( #fetchAndSetPlanFull, [planId], ), - returnValue: - _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( + returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( this, Invocation.method( #fetchAndSetPlanFull, @@ -236,14 +230,12 @@ class MockNutritionPlansProvider extends _i1.Mock )), ) as _i9.Future<_i4.NutritionalPlan>); @override - _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => - (super.noSuchMethod( + _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod( Invocation.method( #addPlan, [planData], ), - returnValue: - _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( + returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( this, Invocation.method( #addPlan, @@ -341,8 +333,7 @@ class MockNutritionPlansProvider extends _i1.Mock )), ) as _i9.Future<_i6.MealItem>); @override - _i9.Future deleteMealItem(_i6.MealItem? mealItem) => - (super.noSuchMethod( + _i9.Future deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod( Invocation.method( #deleteMealItem, [mealItem], @@ -351,8 +342,7 @@ class MockNutritionPlansProvider extends _i1.Mock returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future<_i7.Ingredient> fetchIngredient(int? ingredientId) => - (super.noSuchMethod( + _i9.Future<_i7.Ingredient> fetchIngredient(int? ingredientId) => (super.noSuchMethod( Invocation.method( #fetchIngredient, [ingredientId], @@ -390,8 +380,7 @@ class MockNutritionPlansProvider extends _i1.Mock returnValue: _i9.Future>.value([]), ) as _i9.Future>); @override - _i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => - (super.noSuchMethod( + _i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( Invocation.method( #searchIngredientWithCode, [code], @@ -442,8 +431,7 @@ class MockNutritionPlansProvider extends _i1.Mock returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => - (super.noSuchMethod( + _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod( Invocation.method( #fetchAndSetLogs, [plan], @@ -487,8 +475,7 @@ class MockNutritionPlansProvider extends _i1.Mock #fetch, [uri], ), - returnValue: - _i9.Future>.value({}), + returnValue: _i9.Future>.value({}), ) as _i9.Future>); @override _i9.Future> post( @@ -503,8 +490,7 @@ class MockNutritionPlansProvider extends _i1.Mock uri, ], ), - returnValue: - _i9.Future>.value({}), + returnValue: _i9.Future>.value({}), ) as _i9.Future>); @override _i9.Future> patch( @@ -519,8 +505,7 @@ class MockNutritionPlansProvider extends _i1.Mock uri, ], ), - returnValue: - _i9.Future>.value({}), + returnValue: _i9.Future>.value({}), ) as _i9.Future>); @override _i9.Future<_i3.Response> deleteRequest( diff --git a/test/other/base_provider_test.mocks.dart b/test/other/base_provider_test.mocks.dart index 5483f2a0..d5c998c8 100644 --- a/test/other/base_provider_test.mocks.dart +++ b/test/other/base_provider_test.mocks.dart @@ -31,8 +31,7 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { ); } -class _FakeStreamedResponse_1 extends _i1.SmartFake - implements _i2.StreamedResponse { +class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse { _FakeStreamedResponse_1( Object parent, Invocation parentInvocation, @@ -237,14 +236,12 @@ class MockClient extends _i1.Mock implements _i2.Client { returnValue: _i3.Future<_i5.Uint8List>.value(_i5.Uint8List(0)), ) as _i3.Future<_i5.Uint8List>); @override - _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => - (super.noSuchMethod( + _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( Invocation.method( #send, [request], ), - returnValue: - _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( + returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( this, Invocation.method( #send, diff --git a/test/workout/workout_form_test.mocks.dart b/test/workout/workout_form_test.mocks.dart index a258a843..270bb4db 100644 --- a/test/workout/workout_form_test.mocks.dart +++ b/test/workout/workout_form_test.mocks.dart @@ -41,8 +41,7 @@ class _FakeWeightUnit_0 extends _i1.SmartFake implements _i2.WeightUnit { ); } -class _FakeRepetitionUnit_1 extends _i1.SmartFake - implements _i3.RepetitionUnit { +class _FakeRepetitionUnit_1 extends _i1.SmartFake implements _i3.RepetitionUnit { _FakeRepetitionUnit_1( Object parent, Invocation parentInvocation, @@ -112,8 +111,7 @@ class _FakeSetting_7 extends _i1.SmartFake implements _i9.Setting { ); } -class _FakeWorkoutSession_8 extends _i1.SmartFake - implements _i10.WorkoutSession { +class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { _FakeWorkoutSession_8( Object parent, Invocation parentInvocation, @@ -156,8 +154,7 @@ class _FakeResponse_11 extends _i1.SmartFake 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); } @@ -295,8 +292,7 @@ class MockWorkoutPlansProvider extends _i1.Mock returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future<_i6.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => - (super.noSuchMethod( + _i13.Future<_i6.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( Invocation.method( #fetchAndSetPlanSparse, [planId], @@ -310,8 +306,7 @@ class MockWorkoutPlansProvider extends _i1.Mock )), ) as _i13.Future<_i6.WorkoutPlan>); @override - _i13.Future<_i6.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => - (super.noSuchMethod( + _i13.Future<_i6.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod( Invocation.method( #fetchAndSetWorkoutPlanFull, [workoutId], @@ -325,8 +320,7 @@ class MockWorkoutPlansProvider extends _i1.Mock )), ) as _i13.Future<_i6.WorkoutPlan>); @override - _i13.Future<_i6.WorkoutPlan> addWorkout(_i6.WorkoutPlan? workout) => - (super.noSuchMethod( + _i13.Future<_i6.WorkoutPlan> addWorkout(_i6.WorkoutPlan? workout) => (super.noSuchMethod( Invocation.method( #addWorkout, [workout], @@ -340,8 +334,7 @@ class MockWorkoutPlansProvider extends _i1.Mock )), ) as _i13.Future<_i6.WorkoutPlan>); @override - _i13.Future editWorkout(_i6.WorkoutPlan? workout) => - (super.noSuchMethod( + _i13.Future editWorkout(_i6.WorkoutPlan? workout) => (super.noSuchMethod( Invocation.method( #editWorkout, [workout], @@ -371,8 +364,7 @@ class MockWorkoutPlansProvider extends _i1.Mock exercise, ], ), - returnValue: - _i13.Future>.value({}), + returnValue: _i13.Future>.value({}), ) as _i13.Future>); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( @@ -482,8 +474,7 @@ class MockWorkoutPlansProvider extends _i1.Mock returnValue: _i13.Future>.value(<_i8.Set>[]), ) as _i13.Future>); @override - _i13.Future fetchComputedSettings(_i8.Set? workoutSet) => - (super.noSuchMethod( + _i13.Future fetchComputedSettings(_i8.Set? workoutSet) => (super.noSuchMethod( Invocation.method( #fetchComputedSettings, [workoutSet], @@ -516,8 +507,7 @@ class MockWorkoutPlansProvider extends _i1.Mock returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future<_i9.Setting> addSetting(_i9.Setting? workoutSetting) => - (super.noSuchMethod( + _i13.Future<_i9.Setting> addSetting(_i9.Setting? workoutSetting) => (super.noSuchMethod( Invocation.method( #addSetting, [workoutSetting], @@ -539,14 +529,12 @@ class MockWorkoutPlansProvider extends _i1.Mock returnValue: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => - (super.noSuchMethod( + _i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod( Invocation.method( #addSession, [session], ), - returnValue: - _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( + returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( this, Invocation.method( #addSession, @@ -613,8 +601,7 @@ class MockWorkoutPlansProvider extends _i1.Mock #fetch, [uri], ), - returnValue: - _i13.Future>.value({}), + returnValue: _i13.Future>.value({}), ) as _i13.Future>); @override _i13.Future> post( @@ -629,8 +616,7 @@ class MockWorkoutPlansProvider extends _i1.Mock uri, ], ), - returnValue: - _i13.Future>.value({}), + returnValue: _i13.Future>.value({}), ) as _i13.Future>); @override _i13.Future> patch( @@ -645,8 +631,7 @@ class MockWorkoutPlansProvider extends _i1.Mock uri, ], ), - returnValue: - _i13.Future>.value({}), + returnValue: _i13.Future>.value({}), ) as _i13.Future>); @override _i13.Future<_i5.Response> deleteRequest( diff --git a/test/workout/workout_set_form_test.mocks.dart b/test/workout/workout_set_form_test.mocks.dart index 1d0e4f07..3a05a7d5 100644 --- a/test/workout/workout_set_form_test.mocks.dart +++ b/test/workout/workout_set_form_test.mocks.dart @@ -165,8 +165,7 @@ class MockExercisesProvider extends _i1.Mock implements _i5.ExercisesProvider { returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) => - (super.noSuchMethod( + _i6.Future<_i4.Exercise> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( Invocation.method( #fetchAndSetExercise, [exerciseId], @@ -248,8 +247,7 @@ class MockExercisesProvider extends _i1.Mock implements _i5.ExercisesProvider { #fetch, [uri], ), - returnValue: - _i6.Future>.value({}), + returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override _i6.Future> post( @@ -264,8 +262,7 @@ class MockExercisesProvider extends _i1.Mock implements _i5.ExercisesProvider { uri, ], ), - returnValue: - _i6.Future>.value({}), + returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override _i6.Future> patch( @@ -280,8 +277,7 @@ class MockExercisesProvider extends _i1.Mock implements _i5.ExercisesProvider { uri, ], ), - returnValue: - _i6.Future>.value({}), + returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override _i6.Future<_i3.Response> deleteRequest( From 23313de67a4e2c75ba6d4dc5c6430c2586f845ac Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Wed, 5 Oct 2022 16:55:31 +0200 Subject: [PATCH 11/15] Remove unused file --- android/fastlane/envfiles/wger.properties | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 android/fastlane/envfiles/wger.properties diff --git a/android/fastlane/envfiles/wger.properties b/android/fastlane/envfiles/wger.properties deleted file mode 100644 index c367445e..00000000 --- a/android/fastlane/envfiles/wger.properties +++ /dev/null @@ -1,3 +0,0 @@ -```properties -WGER_API_KEY=77a270641bb5654c517e91f277bf06623c141318 -``` \ No newline at end of file From 92cc1b7e58b759e069b4556bbaa1c5e4dc964f1b Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Wed, 5 Oct 2022 16:56:10 +0200 Subject: [PATCH 12/15] Show correct path in error message --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 547dcded..ec8b0e49 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -51,7 +51,7 @@ if (localMapsPropertiesFile.exists()) { def wgerApiKey = wgerProperties.getProperty('WGER_API_KEY') if(wgerApiKey == null){ wgerApiKey = "" - project.logger.error('Wger Api Key not configured. Set it in `app/wger.properties` or in the environment variable `WGER_API_KEY`') + project.logger.error('Wger Api Key not configured. Set it in `/fastlane/metadata/android/envfiles/wger.properties` or in the environment variable `WGER_API_KEY`') } android { From 718dcfacb34632eac98b0dc1b73c105312c14d2c Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Wed, 5 Oct 2022 16:57:15 +0200 Subject: [PATCH 13/15] Fix check to allow users to register directly over the app... --- lib/screens/auth_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/screens/auth_screen.dart b/lib/screens/auth_screen.dart index d3d77cae..79b8e561 100644 --- a/lib/screens/auth_screen.dart +++ b/lib/screens/auth_screen.dart @@ -119,7 +119,7 @@ class _AuthCardState extends State { // If not, the user will not be able to register via the app try { final metadata = Provider.of(context, listen: false).metadata; - if (metadata.containsKey(MANIFEST_KEY_API) || metadata[MANIFEST_KEY_API] == '') { + if (metadata.containsKey(MANIFEST_KEY_API) && metadata[MANIFEST_KEY_API] == '') { _canRegister = false; } } on PlatformException { From 39c3418a17b219d22e7920a5fca3edbf7d1a98d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Oct 2022 00:57:06 +0000 Subject: [PATCH 14/15] Bump image_picker from 0.8.5 to 0.8.6 Bumps [image_picker](https://github.com/flutter/plugins/tree/main/packages/image_picker) from 0.8.5 to 0.8.6. - [Release notes](https://github.com/flutter/plugins/releases) - [Commits](https://github.com/flutter/plugins/commits/image_picker-v0.8.6/packages/image_picker) --- updated-dependencies: - dependency-name: image_picker dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 30 +++++++++++++++--------------- pubspec.yaml | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 07c1a066..612e9829 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,7 +42,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -154,7 +154,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -217,7 +217,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" code_builder: dependency: transitive description: @@ -287,7 +287,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: transitive description: @@ -489,7 +489,7 @@ packages: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.8.5" + version: "0.8.6" image_picker_android: dependency: transitive description: @@ -510,14 +510,14 @@ packages: name: image_picker_ios url: "https://pub.dartlang.org" source: hosted - version: "0.8.5" + version: "0.8.6+1" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.4.4" + version: "2.6.2" intl: dependency: "direct main" description: @@ -594,21 +594,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: @@ -664,7 +664,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" path_drawing: dependency: transitive description: @@ -879,7 +879,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -907,7 +907,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" table_calendar: dependency: "direct main" description: @@ -921,14 +921,14 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" timing: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b1ddc0cc..315bacc0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -42,7 +42,7 @@ dependencies: flutter_typeahead: ^4.1.1 font_awesome_flutter: ^10.2.1 http: ^0.13.5 - image_picker: ^0.8.4+9 + image_picker: ^0.8.6 intl: ^0.17.0 json_annotation: ^4.7.0 version: ^3.0.2 From ab3bda59d6125eed1dd52e506ba7e29574b440bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Oct 2022 00:57:23 +0000 Subject: [PATCH 15/15] Bump json_serializable from 6.4.1 to 6.5.0 Bumps [json_serializable](https://github.com/google/json_serializable.dart) from 6.4.1 to 6.5.0. - [Release notes](https://github.com/google/json_serializable.dart/releases) - [Commits](https://github.com/google/json_serializable.dart/compare/json_serializable-v6.4.1...json_serializable-v6.5.0) --- updated-dependencies: - dependency-name: json_serializable dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pubspec.lock | 26 +++++++++++++------------- pubspec.yaml | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 07c1a066..e35a8e3a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,7 +42,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -154,7 +154,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -217,7 +217,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" code_builder: dependency: transitive description: @@ -287,7 +287,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: transitive description: @@ -552,7 +552,7 @@ packages: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "6.4.1" + version: "6.5.0" klizma: dependency: transitive description: @@ -594,21 +594,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: @@ -664,7 +664,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" path_drawing: dependency: transitive description: @@ -879,7 +879,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -907,7 +907,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" table_calendar: dependency: "direct main" description: @@ -921,14 +921,14 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" timing: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b1ddc0cc..e4afd38f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,7 +62,7 @@ dev_dependencies: # sdk: flutter build_runner: ^2.2.1 flutter_launcher_icons: ^0.10.0 - json_serializable: ^6.4.1 + json_serializable: ^6.5.0 mockito: ^5.3.2 network_image_mock: ^2.1.1 flutter_lints: ^2.0.1