mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-04 12:42:22 +01:00
Properly filter the ingredient list
This commit is contained in:
@@ -27,11 +27,14 @@ part 'ingredient_notifier.g.dart';
|
||||
/// Debounce window applied to the search-term keystrokes
|
||||
const _searchDebounce = Duration(milliseconds: 350);
|
||||
|
||||
/// Stream of all locally-synced ingredients, ordered by name. Only those
|
||||
/// ingredients used in a nutritional plan or log are synced for offline use.
|
||||
/// Stream of all locally-synced ingredients, ordered by name and narrowed
|
||||
/// by the active dietary/Nutri-Score filters. Only those ingredients used
|
||||
/// in a nutritional plan or log are synced for offline use, so the result
|
||||
/// is always a subset of the user's data.
|
||||
@riverpod
|
||||
Stream<List<Ingredient>> allLocalIngredients(Ref ref) {
|
||||
return ref.watch(ingredientRepositoryProvider).watchAllDrift();
|
||||
final filters = ref.watch(ingredientFiltersSyncProvider);
|
||||
return ref.watch(ingredientRepositoryProvider).watchAllDrift(filters: filters);
|
||||
}
|
||||
|
||||
/// Per-id lookup for a single ingredient from the local Drift database.
|
||||
|
||||
@@ -8,14 +8,18 @@ part of 'ingredient_notifier.dart';
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
/// Stream of all locally-synced ingredients, ordered by name. Only those
|
||||
/// ingredients used in a nutritional plan or log are synced for offline use.
|
||||
/// Stream of all locally-synced ingredients, ordered by name and narrowed
|
||||
/// by the active dietary/Nutri-Score filters. Only those ingredients used
|
||||
/// in a nutritional plan or log are synced for offline use, so the result
|
||||
/// is always a subset of the user's data.
|
||||
|
||||
@ProviderFor(allLocalIngredients)
|
||||
final allLocalIngredientsProvider = AllLocalIngredientsProvider._();
|
||||
|
||||
/// Stream of all locally-synced ingredients, ordered by name. Only those
|
||||
/// ingredients used in a nutritional plan or log are synced for offline use.
|
||||
/// Stream of all locally-synced ingredients, ordered by name and narrowed
|
||||
/// by the active dietary/Nutri-Score filters. Only those ingredients used
|
||||
/// in a nutritional plan or log are synced for offline use, so the result
|
||||
/// is always a subset of the user's data.
|
||||
|
||||
final class AllLocalIngredientsProvider
|
||||
extends
|
||||
@@ -25,8 +29,10 @@ final class AllLocalIngredientsProvider
|
||||
Stream<List<Ingredient>>
|
||||
>
|
||||
with $FutureModifier<List<Ingredient>>, $StreamProvider<List<Ingredient>> {
|
||||
/// Stream of all locally-synced ingredients, ordered by name. Only those
|
||||
/// ingredients used in a nutritional plan or log are synced for offline use.
|
||||
/// Stream of all locally-synced ingredients, ordered by name and narrowed
|
||||
/// by the active dietary/Nutri-Score filters. Only those ingredients used
|
||||
/// in a nutritional plan or log are synced for offline use, so the result
|
||||
/// is always a subset of the user's data.
|
||||
AllLocalIngredientsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
@@ -53,7 +59,7 @@ final class AllLocalIngredientsProvider
|
||||
}
|
||||
}
|
||||
|
||||
String _$allLocalIngredientsHash() => r'fbc70303db57527d9b64540145f52bf5ffbd6808';
|
||||
String _$allLocalIngredientsHash() => r'e976af45df22069a256aa2987251732461f565c3';
|
||||
|
||||
/// Per-id lookup for a single ingredient from the local Drift database.
|
||||
/// Riverpod caches per `id` while listeners exist and disposes otherwise,
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'package:logging/logging.dart';
|
||||
import 'package:wger/helpers/consts.dart';
|
||||
import 'package:wger/models/core/search_options.dart';
|
||||
import 'package:wger/models/nutrition/ingredient.dart';
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart';
|
||||
import 'package:wger/models/nutrition/ingredient_weight_unit.dart';
|
||||
import 'package:wger/providers/base_provider.dart';
|
||||
import 'package:wger/providers/wger_base.dart';
|
||||
@@ -62,13 +63,30 @@ class IngredientRepository {
|
||||
});
|
||||
}
|
||||
|
||||
/// Watches all locally synced ingredients.
|
||||
/// Watches all locally synced ingredients, narrowed by the dietary and
|
||||
/// Nutri-Score predicates on [filters]. Defaults to "no filter".
|
||||
///
|
||||
/// Only ingredients that are used in a nutritional plan or log are
|
||||
/// synced to the device for offline storage in the Drift database.
|
||||
Stream<List<Ingredient>> watchAllDrift() {
|
||||
/// `searchTerm` and `searchLanguage` from [filters] are intentionally
|
||||
/// ignored here, those belong to the server-search path. Only ingredients
|
||||
/// that are used in a nutritional plan or log get synced to the device in
|
||||
/// the first place.
|
||||
Stream<List<Ingredient>> watchAllDrift({
|
||||
IngredientFilters filters = const IngredientFilters(),
|
||||
}) {
|
||||
_logger.finer('Watching all synced ingredients');
|
||||
final query = _baseJoinedQuery()..orderBy([OrderingTerm(expression: _db.ingredientTable.name)]);
|
||||
final query = _baseJoinedQuery();
|
||||
if (filters.isVegan) {
|
||||
query.where(_db.ingredientTable.isVegan.equals(true));
|
||||
}
|
||||
if (filters.isVegetarian) {
|
||||
query.where(_db.ingredientTable.isVegetarian.equals(true));
|
||||
}
|
||||
if (filters.nutriscoreMax != null) {
|
||||
query.where(
|
||||
_db.ingredientTable.nutriscore.isSmallerOrEqualValue(filters.nutriscoreMax!.name),
|
||||
);
|
||||
}
|
||||
query.orderBy([OrderingTerm(expression: _db.ingredientTable.name)]);
|
||||
return query.watch().map((rows) {
|
||||
return _hydrate(rows);
|
||||
});
|
||||
|
||||
@@ -2178,6 +2178,17 @@ class MockAppLocalizations extends _i1.Mock implements _i2.AppLocalizations {
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
String get dietaryInformation =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#dietaryInformation),
|
||||
returnValue: _i3.dummyValue<String>(
|
||||
this,
|
||||
Invocation.getter(#dietaryInformation),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
String get macronutrients =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
import 'dart:async' as _i3;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:wger/models/core/search_options.dart' as _i13;
|
||||
import 'package:wger/models/core/search_options.dart' as _i14;
|
||||
import 'package:wger/models/measurements/measurement_category.dart' as _i4;
|
||||
import 'package:wger/models/measurements/measurement_entry.dart' as _i5;
|
||||
import 'package:wger/models/nutrition/ingredient.dart' as _i12;
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart' as _i13;
|
||||
import 'package:wger/models/nutrition/log.dart' as _i10;
|
||||
import 'package:wger/models/nutrition/meal.dart' as _i8;
|
||||
import 'package:wger/models/nutrition/meal_item.dart' as _i9;
|
||||
@@ -265,9 +266,11 @@ class MockIngredientRepository extends _i1.Mock implements _i11.IngredientReposi
|
||||
as _i3.Stream<_i12.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i3.Stream<List<_i12.Ingredient>> watchAllDrift() =>
|
||||
_i3.Stream<List<_i12.Ingredient>> watchAllDrift({
|
||||
_i13.IngredientFilters? filters = const _i13.IngredientFilters(),
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
Invocation.method(#watchAllDrift, [], {#filters: filters}),
|
||||
returnValue: _i3.Stream<List<_i12.Ingredient>>.empty(),
|
||||
)
|
||||
as _i3.Stream<List<_i12.Ingredient>>);
|
||||
@@ -309,7 +312,7 @@ class MockIngredientRepository extends _i1.Mock implements _i11.IngredientReposi
|
||||
_i3.Future<List<_i12.Ingredient>> searchIngredientServer(
|
||||
String? name, {
|
||||
String? languageCode = 'en',
|
||||
_i13.SearchLanguage? searchLanguage = _i13.SearchLanguage.current,
|
||||
_i14.SearchLanguage? searchLanguage = _i14.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i12.NutriScore? nutriscoreMax,
|
||||
@@ -337,7 +340,7 @@ class MockIngredientRepository extends _i1.Mock implements _i11.IngredientReposi
|
||||
String? name, {
|
||||
required bool? isOnline,
|
||||
String? languageCode = 'en',
|
||||
_i13.SearchLanguage? searchLanguage = _i13.SearchLanguage.current,
|
||||
_i14.SearchLanguage? searchLanguage = _i14.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i12.NutriScore? nutriscoreMax,
|
||||
|
||||
@@ -21,6 +21,8 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockito/annotations.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
import 'package:wger/models/nutrition/ingredient.dart';
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart';
|
||||
import 'package:wger/providers/ingredient_filters_notifier.dart';
|
||||
import 'package:wger/providers/ingredient_notifier.dart';
|
||||
import 'package:wger/providers/ingredient_repository.dart';
|
||||
|
||||
@@ -62,7 +64,9 @@ void main() {
|
||||
group('allLocalIngredientsProvider', () {
|
||||
test('emits the repository stream', () async {
|
||||
final apple = makeIngredient(1, 'Apple');
|
||||
when(mockRepo.watchAllDrift()).thenAnswer((_) => Stream.value([apple]));
|
||||
when(
|
||||
mockRepo.watchAllDrift(filters: anyNamed('filters')),
|
||||
).thenAnswer((_) => Stream.value([apple]));
|
||||
|
||||
final container = makeContainer();
|
||||
// Explicit listen() keeps the autoDispose provider alive long enough
|
||||
@@ -72,7 +76,34 @@ void main() {
|
||||
final result = container.read(allLocalIngredientsProvider).requireValue;
|
||||
|
||||
expect(result.single.id, 1);
|
||||
verify(mockRepo.watchAllDrift()).called(1);
|
||||
verify(mockRepo.watchAllDrift(filters: anyNamed('filters'))).called(1);
|
||||
});
|
||||
|
||||
test('forwards the current filter state to the repository', () async {
|
||||
when(
|
||||
mockRepo.watchAllDrift(filters: anyNamed('filters')),
|
||||
).thenAnswer((_) => Stream.value(const []));
|
||||
|
||||
// Override the sync filter view directly so we don't have to spin up
|
||||
// SharedPreferences just to flip one bool.
|
||||
final container = ProviderContainer.test(
|
||||
overrides: [
|
||||
ingredientRepositoryProvider.overrideWithValue(mockRepo),
|
||||
ingredientFiltersSyncProvider.overrideWithValue(
|
||||
const IngredientFilters(isVegan: true),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
container.listen(allLocalIngredientsProvider, (_, _) {});
|
||||
await pumpEventQueue();
|
||||
|
||||
final captured =
|
||||
verify(
|
||||
mockRepo.watchAllDrift(filters: captureAnyNamed('filters')),
|
||||
).captured.single
|
||||
as IngredientFilters;
|
||||
expect(captured.isVegan, isTrue);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
import 'dart:async' as _i3;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:wger/models/core/search_options.dart' as _i5;
|
||||
import 'package:wger/models/core/search_options.dart' as _i6;
|
||||
import 'package:wger/models/nutrition/ingredient.dart' as _i4;
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart' as _i5;
|
||||
import 'package:wger/providers/ingredient_repository.dart' as _i2;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
@@ -42,9 +43,11 @@ class MockIngredientRepository extends _i1.Mock implements _i2.IngredientReposit
|
||||
as _i3.Stream<_i4.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i3.Stream<List<_i4.Ingredient>> watchAllDrift() =>
|
||||
_i3.Stream<List<_i4.Ingredient>> watchAllDrift({
|
||||
_i5.IngredientFilters? filters = const _i5.IngredientFilters(),
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
Invocation.method(#watchAllDrift, [], {#filters: filters}),
|
||||
returnValue: _i3.Stream<List<_i4.Ingredient>>.empty(),
|
||||
)
|
||||
as _i3.Stream<List<_i4.Ingredient>>);
|
||||
@@ -86,7 +89,7 @@ class MockIngredientRepository extends _i1.Mock implements _i2.IngredientReposit
|
||||
_i3.Future<List<_i4.Ingredient>> searchIngredientServer(
|
||||
String? name, {
|
||||
String? languageCode = 'en',
|
||||
_i5.SearchLanguage? searchLanguage = _i5.SearchLanguage.current,
|
||||
_i6.SearchLanguage? searchLanguage = _i6.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i4.NutriScore? nutriscoreMax,
|
||||
@@ -114,7 +117,7 @@ class MockIngredientRepository extends _i1.Mock implements _i2.IngredientReposit
|
||||
String? name, {
|
||||
required bool? isOnline,
|
||||
String? languageCode = 'en',
|
||||
_i5.SearchLanguage? searchLanguage = _i5.SearchLanguage.current,
|
||||
_i6.SearchLanguage? searchLanguage = _i6.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i4.NutriScore? nutriscoreMax,
|
||||
|
||||
@@ -25,6 +25,7 @@ import 'package:mockito/mockito.dart';
|
||||
import 'package:wger/database/powersync/database.dart';
|
||||
import 'package:wger/models/core/search_options.dart';
|
||||
import 'package:wger/models/nutrition/ingredient.dart';
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart';
|
||||
import 'package:wger/providers/base_provider.dart';
|
||||
import 'package:wger/providers/ingredient_repository.dart';
|
||||
|
||||
@@ -140,6 +141,53 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
group('watchAllDrift', () {
|
||||
test('with default (empty) filters emits every synced ingredient', () async {
|
||||
await seedIngredient(id: 1, name: 'Apple');
|
||||
await seedIngredient(id: 2, name: 'Beef');
|
||||
await seedIngredient(id: 3, name: 'Carrot');
|
||||
|
||||
final emitted = await repo.watchAllDrift().first;
|
||||
|
||||
expect(emitted.map((i) => i.name), ['Apple', 'Beef', 'Carrot']);
|
||||
});
|
||||
|
||||
test('filters.isVegan keeps only rows flagged as vegan', () async {
|
||||
await seedIngredient(id: 1, name: 'Apple', isVegan: true);
|
||||
await seedIngredient(id: 2, name: 'Beef', isVegan: false);
|
||||
await seedIngredient(id: 3, name: 'Carrot', isVegan: true);
|
||||
|
||||
final emitted = await repo
|
||||
.watchAllDrift(filters: const IngredientFilters(isVegan: true))
|
||||
.first;
|
||||
|
||||
expect(emitted.map((i) => i.name), ['Apple', 'Carrot']);
|
||||
});
|
||||
|
||||
test('filters.isVegetarian keeps only rows flagged as vegetarian', () async {
|
||||
await seedIngredient(id: 1, name: 'Apple', isVegetarian: true);
|
||||
await seedIngredient(id: 2, name: 'Beef', isVegetarian: false);
|
||||
|
||||
final emitted = await repo
|
||||
.watchAllDrift(filters: const IngredientFilters(isVegetarian: true))
|
||||
.first;
|
||||
|
||||
expect(emitted.map((i) => i.name), ['Apple']);
|
||||
});
|
||||
|
||||
test('filters.nutriscoreMax keeps only rows at or below the cap', () async {
|
||||
await seedIngredient(id: 1, name: 'Apple', nutriscore: NutriScore.a);
|
||||
await seedIngredient(id: 2, name: 'Beef', nutriscore: NutriScore.c);
|
||||
await seedIngredient(id: 3, name: 'Candy', nutriscore: NutriScore.e);
|
||||
|
||||
final emitted = await repo
|
||||
.watchAllDrift(filters: const IngredientFilters(nutriscoreMax: NutriScore.b))
|
||||
.first;
|
||||
|
||||
expect(emitted.map((i) => i.name), ['Apple']);
|
||||
});
|
||||
});
|
||||
|
||||
group('getById', () {
|
||||
test('returns the ingredient once if it exists', () async {
|
||||
await seedIngredient(id: 1, name: 'Apple');
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
import 'dart:async' as _i3;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:wger/models/core/search_options.dart' as _i10;
|
||||
import 'package:wger/models/core/search_options.dart' as _i11;
|
||||
import 'package:wger/models/nutrition/ingredient.dart' as _i9;
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart' as _i10;
|
||||
import 'package:wger/models/nutrition/log.dart' as _i7;
|
||||
import 'package:wger/models/nutrition/meal.dart' as _i5;
|
||||
import 'package:wger/models/nutrition/meal_item.dart' as _i6;
|
||||
@@ -179,9 +180,11 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
as _i3.Stream<_i9.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i3.Stream<List<_i9.Ingredient>> watchAllDrift() =>
|
||||
_i3.Stream<List<_i9.Ingredient>> watchAllDrift({
|
||||
_i10.IngredientFilters? filters = const _i10.IngredientFilters(),
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
Invocation.method(#watchAllDrift, [], {#filters: filters}),
|
||||
returnValue: _i3.Stream<List<_i9.Ingredient>>.empty(),
|
||||
)
|
||||
as _i3.Stream<List<_i9.Ingredient>>);
|
||||
@@ -223,7 +226,7 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
_i3.Future<List<_i9.Ingredient>> searchIngredientServer(
|
||||
String? name, {
|
||||
String? languageCode = 'en',
|
||||
_i10.SearchLanguage? searchLanguage = _i10.SearchLanguage.current,
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i9.NutriScore? nutriscoreMax,
|
||||
@@ -251,7 +254,7 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
String? name, {
|
||||
required bool? isOnline,
|
||||
String? languageCode = 'en',
|
||||
_i10.SearchLanguage? searchLanguage = _i10.SearchLanguage.current,
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i9.NutriScore? nutriscoreMax,
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
import 'dart:async' as _i3;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:wger/models/core/search_options.dart' as _i10;
|
||||
import 'package:wger/models/core/search_options.dart' as _i11;
|
||||
import 'package:wger/models/nutrition/ingredient.dart' as _i9;
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart' as _i10;
|
||||
import 'package:wger/models/nutrition/log.dart' as _i7;
|
||||
import 'package:wger/models/nutrition/meal.dart' as _i5;
|
||||
import 'package:wger/models/nutrition/meal_item.dart' as _i6;
|
||||
@@ -179,9 +180,11 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
as _i3.Stream<_i9.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i3.Stream<List<_i9.Ingredient>> watchAllDrift() =>
|
||||
_i3.Stream<List<_i9.Ingredient>> watchAllDrift({
|
||||
_i10.IngredientFilters? filters = const _i10.IngredientFilters(),
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
Invocation.method(#watchAllDrift, [], {#filters: filters}),
|
||||
returnValue: _i3.Stream<List<_i9.Ingredient>>.empty(),
|
||||
)
|
||||
as _i3.Stream<List<_i9.Ingredient>>);
|
||||
@@ -223,7 +226,7 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
_i3.Future<List<_i9.Ingredient>> searchIngredientServer(
|
||||
String? name, {
|
||||
String? languageCode = 'en',
|
||||
_i10.SearchLanguage? searchLanguage = _i10.SearchLanguage.current,
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i9.NutriScore? nutriscoreMax,
|
||||
@@ -251,7 +254,7 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
String? name, {
|
||||
required bool? isOnline,
|
||||
String? languageCode = 'en',
|
||||
_i10.SearchLanguage? searchLanguage = _i10.SearchLanguage.current,
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i9.NutriScore? nutriscoreMax,
|
||||
|
||||
@@ -4,20 +4,21 @@
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i4;
|
||||
import 'dart:convert' as _i12;
|
||||
import 'dart:typed_data' as _i14;
|
||||
import 'dart:convert' as _i13;
|
||||
import 'dart:typed_data' as _i15;
|
||||
|
||||
import 'package:http/http.dart' as _i2;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i13;
|
||||
import 'package:wger/models/body_weight/weight_entry.dart' as _i16;
|
||||
import 'package:wger/models/core/search_options.dart' as _i11;
|
||||
import 'package:mockito/src/dummies.dart' as _i14;
|
||||
import 'package:wger/models/body_weight/weight_entry.dart' as _i17;
|
||||
import 'package:wger/models/core/search_options.dart' as _i12;
|
||||
import 'package:wger/models/nutrition/ingredient.dart' as _i10;
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart' as _i11;
|
||||
import 'package:wger/models/nutrition/log.dart' as _i8;
|
||||
import 'package:wger/models/nutrition/meal.dart' as _i6;
|
||||
import 'package:wger/models/nutrition/meal_item.dart' as _i7;
|
||||
import 'package:wger/models/nutrition/nutritional_plan.dart' as _i5;
|
||||
import 'package:wger/providers/body_weight_repository.dart' as _i15;
|
||||
import 'package:wger/providers/body_weight_repository.dart' as _i16;
|
||||
import 'package:wger/providers/ingredient_repository.dart' as _i9;
|
||||
import 'package:wger/providers/nutrition_repository.dart' as _i3;
|
||||
|
||||
@@ -194,9 +195,11 @@ class MockIngredientRepository extends _i1.Mock implements _i9.IngredientReposit
|
||||
as _i4.Stream<_i10.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i4.Stream<List<_i10.Ingredient>> watchAllDrift() =>
|
||||
_i4.Stream<List<_i10.Ingredient>> watchAllDrift({
|
||||
_i11.IngredientFilters? filters = const _i11.IngredientFilters(),
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
Invocation.method(#watchAllDrift, [], {#filters: filters}),
|
||||
returnValue: _i4.Stream<List<_i10.Ingredient>>.empty(),
|
||||
)
|
||||
as _i4.Stream<List<_i10.Ingredient>>);
|
||||
@@ -238,7 +241,7 @@ class MockIngredientRepository extends _i1.Mock implements _i9.IngredientReposit
|
||||
_i4.Future<List<_i10.Ingredient>> searchIngredientServer(
|
||||
String? name, {
|
||||
String? languageCode = 'en',
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
_i12.SearchLanguage? searchLanguage = _i12.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i10.NutriScore? nutriscoreMax,
|
||||
@@ -266,7 +269,7 @@ class MockIngredientRepository extends _i1.Mock implements _i9.IngredientReposit
|
||||
String? name, {
|
||||
required bool? isOnline,
|
||||
String? languageCode = 'en',
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
_i12.SearchLanguage? searchLanguage = _i12.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i10.NutriScore? nutriscoreMax,
|
||||
@@ -338,7 +341,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i12.Encoding? encoding,
|
||||
_i13.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -364,7 +367,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i12.Encoding? encoding,
|
||||
_i13.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -390,7 +393,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i12.Encoding? encoding,
|
||||
_i13.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -416,7 +419,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i12.Encoding? encoding,
|
||||
_i13.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -442,7 +445,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i4.Future<String>.value(
|
||||
_i13.dummyValue<String>(
|
||||
_i14.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
),
|
||||
@@ -451,15 +454,15 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
as _i4.Future<String>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i14.Uint8List> readBytes(
|
||||
_i4.Future<_i15.Uint8List> readBytes(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#readBytes, [url], {#headers: headers}),
|
||||
returnValue: _i4.Future<_i14.Uint8List>.value(_i14.Uint8List(0)),
|
||||
returnValue: _i4.Future<_i15.Uint8List>.value(_i15.Uint8List(0)),
|
||||
)
|
||||
as _i4.Future<_i14.Uint8List>);
|
||||
as _i4.Future<_i15.Uint8List>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
@@ -484,18 +487,18 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
/// A class which mocks [BodyWeightRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightRepository extends _i1.Mock implements _i15.BodyWeightRepository {
|
||||
class MockBodyWeightRepository extends _i1.Mock implements _i16.BodyWeightRepository {
|
||||
MockBodyWeightRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Stream<List<_i16.WeightEntry>> watchAllDrift() =>
|
||||
_i4.Stream<List<_i17.WeightEntry>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
returnValue: _i4.Stream<List<_i16.WeightEntry>>.empty(),
|
||||
returnValue: _i4.Stream<List<_i17.WeightEntry>>.empty(),
|
||||
)
|
||||
as _i4.Stream<List<_i16.WeightEntry>>);
|
||||
as _i4.Stream<List<_i17.WeightEntry>>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteLocalDrift(String? id) =>
|
||||
@@ -507,7 +510,7 @@ class MockBodyWeightRepository extends _i1.Mock implements _i15.BodyWeightReposi
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> updateLocalDrift(_i16.WeightEntry? entry) =>
|
||||
_i4.Future<void> updateLocalDrift(_i17.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updateLocalDrift, [entry]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
@@ -516,7 +519,7 @@ class MockBodyWeightRepository extends _i1.Mock implements _i15.BodyWeightReposi
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> addLocalDrift(_i16.WeightEntry? entry) =>
|
||||
_i4.Future<void> addLocalDrift(_i17.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLocalDrift, [entry]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
|
||||
@@ -4,24 +4,25 @@
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i4;
|
||||
import 'dart:convert' as _i12;
|
||||
import 'dart:typed_data' as _i14;
|
||||
import 'dart:convert' as _i13;
|
||||
import 'dart:typed_data' as _i15;
|
||||
|
||||
import 'package:http/http.dart' as _i2;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i13;
|
||||
import 'package:wger/models/body_weight/weight_entry.dart' as _i16;
|
||||
import 'package:wger/models/core/search_options.dart' as _i11;
|
||||
import 'package:mockito/src/dummies.dart' as _i14;
|
||||
import 'package:wger/models/body_weight/weight_entry.dart' as _i17;
|
||||
import 'package:wger/models/core/search_options.dart' as _i12;
|
||||
import 'package:wger/models/nutrition/ingredient.dart' as _i10;
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart' as _i11;
|
||||
import 'package:wger/models/nutrition/log.dart' as _i8;
|
||||
import 'package:wger/models/nutrition/meal.dart' as _i6;
|
||||
import 'package:wger/models/nutrition/meal_item.dart' as _i7;
|
||||
import 'package:wger/models/nutrition/nutritional_plan.dart' as _i5;
|
||||
import 'package:wger/models/user/user_profile.dart' as _i18;
|
||||
import 'package:wger/providers/body_weight_repository.dart' as _i15;
|
||||
import 'package:wger/models/user/user_profile.dart' as _i19;
|
||||
import 'package:wger/providers/body_weight_repository.dart' as _i16;
|
||||
import 'package:wger/providers/ingredient_repository.dart' as _i9;
|
||||
import 'package:wger/providers/nutrition_repository.dart' as _i3;
|
||||
import 'package:wger/providers/user_profile_repository.dart' as _i17;
|
||||
import 'package:wger/providers/user_profile_repository.dart' as _i18;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -196,9 +197,11 @@ class MockIngredientRepository extends _i1.Mock implements _i9.IngredientReposit
|
||||
as _i4.Stream<_i10.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i4.Stream<List<_i10.Ingredient>> watchAllDrift() =>
|
||||
_i4.Stream<List<_i10.Ingredient>> watchAllDrift({
|
||||
_i11.IngredientFilters? filters = const _i11.IngredientFilters(),
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
Invocation.method(#watchAllDrift, [], {#filters: filters}),
|
||||
returnValue: _i4.Stream<List<_i10.Ingredient>>.empty(),
|
||||
)
|
||||
as _i4.Stream<List<_i10.Ingredient>>);
|
||||
@@ -240,7 +243,7 @@ class MockIngredientRepository extends _i1.Mock implements _i9.IngredientReposit
|
||||
_i4.Future<List<_i10.Ingredient>> searchIngredientServer(
|
||||
String? name, {
|
||||
String? languageCode = 'en',
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
_i12.SearchLanguage? searchLanguage = _i12.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i10.NutriScore? nutriscoreMax,
|
||||
@@ -268,7 +271,7 @@ class MockIngredientRepository extends _i1.Mock implements _i9.IngredientReposit
|
||||
String? name, {
|
||||
required bool? isOnline,
|
||||
String? languageCode = 'en',
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
_i12.SearchLanguage? searchLanguage = _i12.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i10.NutriScore? nutriscoreMax,
|
||||
@@ -340,7 +343,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i12.Encoding? encoding,
|
||||
_i13.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -366,7 +369,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i12.Encoding? encoding,
|
||||
_i13.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -392,7 +395,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i12.Encoding? encoding,
|
||||
_i13.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -418,7 +421,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i12.Encoding? encoding,
|
||||
_i13.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -444,7 +447,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i4.Future<String>.value(
|
||||
_i13.dummyValue<String>(
|
||||
_i14.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
),
|
||||
@@ -453,15 +456,15 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
as _i4.Future<String>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i14.Uint8List> readBytes(
|
||||
_i4.Future<_i15.Uint8List> readBytes(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#readBytes, [url], {#headers: headers}),
|
||||
returnValue: _i4.Future<_i14.Uint8List>.value(_i14.Uint8List(0)),
|
||||
returnValue: _i4.Future<_i15.Uint8List>.value(_i15.Uint8List(0)),
|
||||
)
|
||||
as _i4.Future<_i14.Uint8List>);
|
||||
as _i4.Future<_i15.Uint8List>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
@@ -486,18 +489,18 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
/// A class which mocks [BodyWeightRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightRepository extends _i1.Mock implements _i15.BodyWeightRepository {
|
||||
class MockBodyWeightRepository extends _i1.Mock implements _i16.BodyWeightRepository {
|
||||
MockBodyWeightRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Stream<List<_i16.WeightEntry>> watchAllDrift() =>
|
||||
_i4.Stream<List<_i17.WeightEntry>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
returnValue: _i4.Stream<List<_i16.WeightEntry>>.empty(),
|
||||
returnValue: _i4.Stream<List<_i17.WeightEntry>>.empty(),
|
||||
)
|
||||
as _i4.Stream<List<_i16.WeightEntry>>);
|
||||
as _i4.Stream<List<_i17.WeightEntry>>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteLocalDrift(String? id) =>
|
||||
@@ -509,7 +512,7 @@ class MockBodyWeightRepository extends _i1.Mock implements _i15.BodyWeightReposi
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> updateLocalDrift(_i16.WeightEntry? entry) =>
|
||||
_i4.Future<void> updateLocalDrift(_i17.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updateLocalDrift, [entry]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
@@ -518,7 +521,7 @@ class MockBodyWeightRepository extends _i1.Mock implements _i15.BodyWeightReposi
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> addLocalDrift(_i16.WeightEntry? entry) =>
|
||||
_i4.Future<void> addLocalDrift(_i17.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLocalDrift, [entry]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
@@ -530,21 +533,21 @@ class MockBodyWeightRepository extends _i1.Mock implements _i15.BodyWeightReposi
|
||||
/// A class which mocks [UserProfileRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockUserProfileRepository extends _i1.Mock implements _i17.UserProfileRepository {
|
||||
class MockUserProfileRepository extends _i1.Mock implements _i18.UserProfileRepository {
|
||||
MockUserProfileRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Stream<_i18.UserProfile?> watchDrift() =>
|
||||
_i4.Stream<_i19.UserProfile?> watchDrift() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchDrift, []),
|
||||
returnValue: _i4.Stream<_i18.UserProfile?>.empty(),
|
||||
returnValue: _i4.Stream<_i19.UserProfile?>.empty(),
|
||||
)
|
||||
as _i4.Stream<_i18.UserProfile?>);
|
||||
as _i4.Stream<_i19.UserProfile?>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> editLocalDrift(_i18.UserProfile? profile) =>
|
||||
_i4.Future<void> editLocalDrift(_i19.UserProfile? profile) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editLocalDrift, [profile]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
|
||||
@@ -6,18 +6,19 @@
|
||||
import 'dart:async' as _i3;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:wger/models/body_weight/weight_entry.dart' as _i12;
|
||||
import 'package:wger/models/core/search_options.dart' as _i10;
|
||||
import 'package:wger/models/body_weight/weight_entry.dart' as _i13;
|
||||
import 'package:wger/models/core/search_options.dart' as _i11;
|
||||
import 'package:wger/models/nutrition/ingredient.dart' as _i9;
|
||||
import 'package:wger/models/nutrition/ingredient_filters.dart' as _i10;
|
||||
import 'package:wger/models/nutrition/log.dart' as _i7;
|
||||
import 'package:wger/models/nutrition/meal.dart' as _i5;
|
||||
import 'package:wger/models/nutrition/meal_item.dart' as _i6;
|
||||
import 'package:wger/models/nutrition/nutritional_plan.dart' as _i4;
|
||||
import 'package:wger/models/user/user_profile.dart' as _i14;
|
||||
import 'package:wger/providers/body_weight_repository.dart' as _i11;
|
||||
import 'package:wger/models/user/user_profile.dart' as _i15;
|
||||
import 'package:wger/providers/body_weight_repository.dart' as _i12;
|
||||
import 'package:wger/providers/ingredient_repository.dart' as _i8;
|
||||
import 'package:wger/providers/nutrition_repository.dart' as _i2;
|
||||
import 'package:wger/providers/user_profile_repository.dart' as _i13;
|
||||
import 'package:wger/providers/user_profile_repository.dart' as _i14;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -183,9 +184,11 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
as _i3.Stream<_i9.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i3.Stream<List<_i9.Ingredient>> watchAllDrift() =>
|
||||
_i3.Stream<List<_i9.Ingredient>> watchAllDrift({
|
||||
_i10.IngredientFilters? filters = const _i10.IngredientFilters(),
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
Invocation.method(#watchAllDrift, [], {#filters: filters}),
|
||||
returnValue: _i3.Stream<List<_i9.Ingredient>>.empty(),
|
||||
)
|
||||
as _i3.Stream<List<_i9.Ingredient>>);
|
||||
@@ -227,7 +230,7 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
_i3.Future<List<_i9.Ingredient>> searchIngredientServer(
|
||||
String? name, {
|
||||
String? languageCode = 'en',
|
||||
_i10.SearchLanguage? searchLanguage = _i10.SearchLanguage.current,
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i9.NutriScore? nutriscoreMax,
|
||||
@@ -255,7 +258,7 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
String? name, {
|
||||
required bool? isOnline,
|
||||
String? languageCode = 'en',
|
||||
_i10.SearchLanguage? searchLanguage = _i10.SearchLanguage.current,
|
||||
_i11.SearchLanguage? searchLanguage = _i11.SearchLanguage.current,
|
||||
bool? isVegan = false,
|
||||
bool? isVegetarian = false,
|
||||
_i9.NutriScore? nutriscoreMax,
|
||||
@@ -291,18 +294,18 @@ class MockIngredientRepository extends _i1.Mock implements _i8.IngredientReposit
|
||||
/// A class which mocks [BodyWeightRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightRepository extends _i1.Mock implements _i11.BodyWeightRepository {
|
||||
class MockBodyWeightRepository extends _i1.Mock implements _i12.BodyWeightRepository {
|
||||
MockBodyWeightRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i3.Stream<List<_i12.WeightEntry>> watchAllDrift() =>
|
||||
_i3.Stream<List<_i13.WeightEntry>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchAllDrift, []),
|
||||
returnValue: _i3.Stream<List<_i12.WeightEntry>>.empty(),
|
||||
returnValue: _i3.Stream<List<_i13.WeightEntry>>.empty(),
|
||||
)
|
||||
as _i3.Stream<List<_i12.WeightEntry>>);
|
||||
as _i3.Stream<List<_i13.WeightEntry>>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> deleteLocalDrift(String? id) =>
|
||||
@@ -314,7 +317,7 @@ class MockBodyWeightRepository extends _i1.Mock implements _i11.BodyWeightReposi
|
||||
as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> updateLocalDrift(_i12.WeightEntry? entry) =>
|
||||
_i3.Future<void> updateLocalDrift(_i13.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updateLocalDrift, [entry]),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
@@ -323,7 +326,7 @@ class MockBodyWeightRepository extends _i1.Mock implements _i11.BodyWeightReposi
|
||||
as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> addLocalDrift(_i12.WeightEntry? entry) =>
|
||||
_i3.Future<void> addLocalDrift(_i13.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLocalDrift, [entry]),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
@@ -335,21 +338,21 @@ class MockBodyWeightRepository extends _i1.Mock implements _i11.BodyWeightReposi
|
||||
/// A class which mocks [UserProfileRepository].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockUserProfileRepository extends _i1.Mock implements _i13.UserProfileRepository {
|
||||
class MockUserProfileRepository extends _i1.Mock implements _i14.UserProfileRepository {
|
||||
MockUserProfileRepository() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i3.Stream<_i14.UserProfile?> watchDrift() =>
|
||||
_i3.Stream<_i15.UserProfile?> watchDrift() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#watchDrift, []),
|
||||
returnValue: _i3.Stream<_i14.UserProfile?>.empty(),
|
||||
returnValue: _i3.Stream<_i15.UserProfile?>.empty(),
|
||||
)
|
||||
as _i3.Stream<_i14.UserProfile?>);
|
||||
as _i3.Stream<_i15.UserProfile?>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> editLocalDrift(_i14.UserProfile? profile) =>
|
||||
_i3.Future<void> editLocalDrift(_i15.UserProfile? profile) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editLocalDrift, [profile]),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
|
||||
Reference in New Issue
Block a user