Skip to content

Commit d79645a

Browse files
committed
The ingredient ID is an integer, not a string
1 parent 525fc8e commit d79645a

24 files changed

+35
-32
lines changed

lib/models/nutrition/image.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,26 @@ class IngredientImage {
3030

3131
/// Name of the product
3232
@JsonKey(required: true, name: 'ingredient_id')
33-
final String ingredientId;
33+
final int ingredientId;
3434

35+
/// URL of the image on the server
3536
@JsonKey(required: true)
3637
final String image;
3738

3839
/// Size in bytes
3940
@JsonKey(required: true)
4041
final int size;
4142

42-
const IngredientImage(
43-
{required this.id,
44-
required this.uuid,
45-
required this.ingredientId,
46-
required this.image,
47-
required this.size});
43+
const IngredientImage({
44+
required this.id,
45+
required this.uuid,
46+
required this.ingredientId,
47+
required this.image,
48+
required this.size,
49+
});
4850

4951
// Boilerplate
5052
factory IngredientImage.fromJson(Map<String, dynamic> json) => _$IngredientImageFromJson(json);
53+
5154
Map<String, dynamic> toJson() => _$IngredientImageToJson(this);
5255
}

lib/models/nutrition/image.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/exercises/contribute_exercise_test.mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Mocks generated by Mockito 5.3.2 from annotations
1+
// Mocks generated by Mockito 5.4.0 from annotations
22
// in wger/test/exercises/contribute_exercise_test.dart.
33
// Do not manually edit this file.
44

test/gallery/gallery_form_test.mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Mocks generated by Mockito 5.3.2 from annotations
1+
// Mocks generated by Mockito 5.4.0 from annotations
22
// in wger/test/gallery/gallery_form_test.dart.
33
// Do not manually edit this file.
44

test/gallery/gallery_screen_test.mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Mocks generated by Mockito 5.3.2 from annotations
1+
// Mocks generated by Mockito 5.4.0 from annotations
22
// in wger/test/gallery/gallery_screen_test.dart.
33
// Do not manually edit this file.
44

test/measurements/measurement_categories_screen_test.mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Mocks generated by Mockito 5.3.2 from annotations
1+
// Mocks generated by Mockito 5.4.0 from annotations
22
// in wger/test/measurements/measurement_categories_screen_test.dart.
33
// Do not manually edit this file.
44

test/measurements/measurement_provider_test.mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Mocks generated by Mockito 5.3.2 from annotations
1+
// Mocks generated by Mockito 5.4.0 from annotations
22
// in wger/test/measurements/measurement_provider_test.dart.
33
// Do not manually edit this file.
44

test/nutrition/nutritional_meal_form_test.mocks.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Mocks generated by Mockito 5.3.2 from annotations
1+
// Mocks generated by Mockito 5.4.0 from annotations
22
// in wger/test/nutrition/nutritional_meal_form_test.dart.
33
// Do not manually edit this file.
44

@@ -359,7 +359,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
359359
]) =>
360360
(super.noSuchMethod(
361361
Invocation.method(
362-
#logIngredentToDiary,
362+
#logIngredientToDiary,
363363
[
364364
mealItem,
365365
planId,

test/nutrition/nutritional_plan_form_test.mocks.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Mocks generated by Mockito 5.3.2 from annotations
1+
// Mocks generated by Mockito 5.4.0 from annotations
22
// in wger/test/nutrition/nutritional_plan_form_test.dart.
33
// Do not manually edit this file.
44

@@ -359,7 +359,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
359359
]) =>
360360
(super.noSuchMethod(
361361
Invocation.method(
362-
#logIngredentToDiary,
362+
#logIngredientToDiary,
363363
[
364364
mealItem,
365365
planId,

test/nutrition/nutritional_plan_screen_test.mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Mocks generated by Mockito 5.3.2 from annotations
1+
// Mocks generated by Mockito 5.4.0 from annotations
22
// in wger/test/nutrition/nutritional_plan_screen_test.dart.
33
// Do not manually edit this file.
44

0 commit comments

Comments
 (0)