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