mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-29 09:20:56 +01:00
Remove unused methods
This commit is contained in:
@@ -22,7 +22,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:wger/database/powersync/database.dart';
|
||||
import 'package:wger/helpers/consts.dart';
|
||||
import 'package:wger/models/nutrition/ingredient.dart';
|
||||
import 'package:wger/models/nutrition/ingredient_weight_unit.dart';
|
||||
import 'package:wger/models/nutrition/log.dart';
|
||||
@@ -59,13 +58,6 @@ class NutritionRepository {
|
||||
|
||||
// --- Plans ---
|
||||
|
||||
Future<List<dynamic>> fetchAllPlans() async {
|
||||
_logger.fine('Fetching all plans (sparse)');
|
||||
return _base.fetchPaginated(
|
||||
_base.makeUrl(plansPath, query: {'limit': API_MAX_PAGE_SIZE}),
|
||||
);
|
||||
}
|
||||
|
||||
Future<Map<String, dynamic>> fetchPlanSparse(int planId) async {
|
||||
_logger.fine('Fetching plan $planId (sparse)');
|
||||
final data = await _base.fetch(_base.makeUrl(plansPath, id: planId));
|
||||
@@ -82,14 +74,6 @@ class NutritionRepository {
|
||||
return _base.post(data, _base.makeUrl(plansPath));
|
||||
}
|
||||
|
||||
Future<void> updatePlan(int id, Map<String, dynamic> data) async {
|
||||
await _base.patch(data, _base.makeUrl(plansPath, id: id));
|
||||
}
|
||||
|
||||
Future<http.Response> deletePlan(int id) async {
|
||||
return _base.deleteRequest(plansPath, id);
|
||||
}
|
||||
|
||||
/// Streams all nutritional plans from the local PowerSync-backed Drift table.
|
||||
///
|
||||
/// Sort matches Django's `NutritionalPlan.Meta.ordering = ['-start']` so
|
||||
|
||||
@@ -115,18 +115,6 @@ class RoutinesRepository {
|
||||
return Routine.fromJson(data);
|
||||
}
|
||||
|
||||
Future<Routine> editRoutineServer(Routine routine) async {
|
||||
await _baseProvider.patch(
|
||||
routine.toJson(),
|
||||
_baseProvider.makeUrl(_routinesUrlPath, id: routine.id),
|
||||
);
|
||||
return fetchAndSetRoutineFullServer(routine.id!);
|
||||
}
|
||||
|
||||
Future<void> deleteRoutineServer(int id) async {
|
||||
await _baseProvider.deleteRequest(_routinesUrlPath, id);
|
||||
}
|
||||
|
||||
/// Streams all routines from the local PowerSync-backed Drift table.
|
||||
///
|
||||
/// Templates (`is_template = TRUE`, including public ones) are excluded at
|
||||
|
||||
@@ -126,14 +126,6 @@ class MockNutritionRepository extends _i1.Mock implements _i7.NutritionRepositor
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Future<List<dynamic>> fetchAllPlans() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAllPlans, []),
|
||||
returnValue: _i4.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i4.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> fetchPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
@@ -164,25 +156,6 @@ class MockNutritionRepository extends _i1.Mock implements _i7.NutritionRepositor
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> updatePlan(int? id, Map<String, dynamic>? data) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updatePlan, [id, data]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.Response> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i4.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(this, Invocation.method(#deletePlan, [id])),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i4.Stream<List<_i8.NutritionalPlan>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -284,7 +284,6 @@ void main() {
|
||||
await container.read(nutritionProvider.notifier).editPlan(plan);
|
||||
|
||||
verify(mockRepo.editLocalDrift(plan)).called(1);
|
||||
verifyNever(mockRepo.updatePlan(any, any));
|
||||
});
|
||||
|
||||
test('deletePlan delegates to deleteLocalDrift (PowerSync), not REST', () async {
|
||||
@@ -293,7 +292,6 @@ void main() {
|
||||
await container.read(nutritionProvider.notifier).deletePlan(1);
|
||||
|
||||
verify(mockRepo.deleteLocalDrift(1)).called(1);
|
||||
verifyNever(mockRepo.deletePlan(any));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,14 +40,6 @@ class MockNutritionRepository extends _i1.Mock implements _i3.NutritionRepositor
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Future<List<dynamic>> fetchAllPlans() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAllPlans, []),
|
||||
returnValue: _i4.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i4.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> fetchPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
@@ -78,25 +70,6 @@ class MockNutritionRepository extends _i1.Mock implements _i3.NutritionRepositor
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> updatePlan(int? id, Map<String, dynamic>? data) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updatePlan, [id, data]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.Response> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i4.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(this, Invocation.method(#deletePlan, [id])),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i4.Stream<List<_i5.NutritionalPlan>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -40,14 +40,6 @@ class MockNutritionRepository extends _i1.Mock implements _i3.NutritionRepositor
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Future<List<dynamic>> fetchAllPlans() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAllPlans, []),
|
||||
returnValue: _i4.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i4.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> fetchPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
@@ -78,25 +70,6 @@ class MockNutritionRepository extends _i1.Mock implements _i3.NutritionRepositor
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> updatePlan(int? id, Map<String, dynamic>? data) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updatePlan, [id, data]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.Response> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i4.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(this, Invocation.method(#deletePlan, [id])),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i4.Stream<List<_i5.NutritionalPlan>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -50,14 +50,6 @@ class MockNutritionRepository extends _i1.Mock implements _i3.NutritionRepositor
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Future<List<dynamic>> fetchAllPlans() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAllPlans, []),
|
||||
returnValue: _i4.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i4.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> fetchPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
@@ -88,25 +80,6 @@ class MockNutritionRepository extends _i1.Mock implements _i3.NutritionRepositor
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> updatePlan(int? id, Map<String, dynamic>? data) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updatePlan, [id, data]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.Response> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i4.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(this, Invocation.method(#deletePlan, [id])),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i4.Stream<List<_i5.NutritionalPlan>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -56,14 +56,6 @@ class MockNutritionRepository extends _i1.Mock implements _i4.NutritionRepositor
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchAllPlans() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAllPlans, []),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> fetchPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
@@ -94,25 +86,6 @@ class MockNutritionRepository extends _i1.Mock implements _i4.NutritionRepositor
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> updatePlan(int? id, Map<String, dynamic>? data) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updatePlan, [id, data]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.Response> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(this, Invocation.method(#deletePlan, [id])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i5.Stream<List<_i6.NutritionalPlan>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -82,28 +82,6 @@ class MockRoutinesRepository extends _i1.Mock implements _i7.RoutinesRepository
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i2.Routine> editRoutineServer(_i2.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
returnValue: _i8.Future<_i2.Routine>.value(
|
||||
_FakeRoutine_0(
|
||||
this,
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteRoutineServer(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutineServer, [id]),
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
)
|
||||
as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Stream<List<_i2.Routine>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -82,28 +82,6 @@ class MockRoutinesRepository extends _i1.Mock implements _i7.RoutinesRepository
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i2.Routine> editRoutineServer(_i2.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
returnValue: _i8.Future<_i2.Routine>.value(
|
||||
_FakeRoutine_0(
|
||||
this,
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteRoutineServer(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutineServer, [id]),
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
)
|
||||
as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Stream<List<_i2.Routine>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -163,28 +163,6 @@ class MockRoutinesRepository extends _i1.Mock implements _i12.RoutinesRepository
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i2.Routine> editRoutineServer(_i2.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
returnValue: _i8.Future<_i2.Routine>.value(
|
||||
_FakeRoutine_0(
|
||||
this,
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteRoutineServer(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutineServer, [id]),
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
)
|
||||
as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Stream<List<_i2.Routine>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -82,28 +82,6 @@ class MockRoutinesRepository extends _i1.Mock implements _i7.RoutinesRepository
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i2.Routine> editRoutineServer(_i2.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
returnValue: _i8.Future<_i2.Routine>.value(
|
||||
_FakeRoutine_0(
|
||||
this,
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteRoutineServer(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutineServer, [id]),
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
)
|
||||
as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Stream<List<_i2.Routine>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -86,28 +86,6 @@ class MockRoutinesRepository extends _i1.Mock implements _i7.RoutinesRepository
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i2.Routine> editRoutineServer(_i2.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
returnValue: _i8.Future<_i2.Routine>.value(
|
||||
_FakeRoutine_0(
|
||||
this,
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteRoutineServer(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutineServer, [id]),
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
)
|
||||
as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Stream<List<_i2.Routine>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:mockito/annotations.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
import 'package:wger/database/powersync/database.dart';
|
||||
@@ -73,18 +72,6 @@ void main() {
|
||||
expect(plan.description, 'Test workout abcd');
|
||||
});
|
||||
|
||||
test('Test deleting a workout plan', () async {
|
||||
// Arrange
|
||||
when(mockBaseProvider.deleteRequest('routine', 325397)).thenAnswer(
|
||||
(_) => Future.value(Response('', 204)),
|
||||
);
|
||||
|
||||
// Act
|
||||
final repo = RoutinesRepository(mockBaseProvider, mockDb);
|
||||
await repo.deleteRoutineServer(325397);
|
||||
verify(mockBaseProvider.deleteRequest('routine', 325397)).called(1);
|
||||
});
|
||||
|
||||
test('Smoke test fetchAndSetRoutineFullServer', () async {
|
||||
//Arrange
|
||||
final structureUri = Uri.https('localhost', 'api/v2/routine/101/structure/');
|
||||
|
||||
@@ -86,28 +86,6 @@ class MockRoutinesRepository extends _i1.Mock implements _i7.RoutinesRepository
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i2.Routine> editRoutineServer(_i2.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
returnValue: _i8.Future<_i2.Routine>.value(
|
||||
_FakeRoutine_0(
|
||||
this,
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteRoutineServer(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutineServer, [id]),
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
)
|
||||
as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Stream<List<_i2.Routine>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -82,28 +82,6 @@ class MockRoutinesRepository extends _i1.Mock implements _i7.RoutinesRepository
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i2.Routine> editRoutineServer(_i2.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
returnValue: _i8.Future<_i2.Routine>.value(
|
||||
_FakeRoutine_0(
|
||||
this,
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteRoutineServer(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutineServer, [id]),
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
)
|
||||
as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Stream<List<_i2.Routine>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -82,28 +82,6 @@ class MockRoutinesRepository extends _i1.Mock implements _i7.RoutinesRepository
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<_i2.Routine> editRoutineServer(_i2.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
returnValue: _i8.Future<_i2.Routine>.value(
|
||||
_FakeRoutine_0(
|
||||
this,
|
||||
Invocation.method(#editRoutineServer, [routine]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i8.Future<_i2.Routine>);
|
||||
|
||||
@override
|
||||
_i8.Future<void> deleteRoutineServer(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutineServer, [id]),
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
)
|
||||
as _i8.Future<void>);
|
||||
|
||||
@override
|
||||
_i8.Stream<List<_i2.Routine>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -48,14 +48,6 @@ class MockNutritionRepository extends _i1.Mock implements _i4.NutritionRepositor
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchAllPlans() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAllPlans, []),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> fetchPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
@@ -86,25 +78,6 @@ class MockNutritionRepository extends _i1.Mock implements _i4.NutritionRepositor
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> updatePlan(int? id, Map<String, dynamic>? data) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updatePlan, [id, data]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.Response> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(this, Invocation.method(#deletePlan, [id])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i5.Stream<List<_i6.NutritionalPlan>> watchAllDrift() =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
Reference in New Issue
Block a user