mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Regenerated all classes.
This commit is contained in:
@@ -18,7 +18,8 @@ WeightEntry _$WeightEntryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightEntryToJson(WeightEntry instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$WeightEntryToJson(WeightEntry instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'weight': numToString(instance.weight),
|
||||
'date': toDate(instance.date),
|
||||
|
||||
@@ -17,7 +17,8 @@ ExerciseCategory _$ExerciseCategoryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseCategoryToJson(ExerciseCategory instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -44,7 +44,8 @@ Exercise _$ExerciseFromJson(Map<String, dynamic> json) {
|
||||
tips: (json['comments'] as List<dynamic>?)
|
||||
?.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
)..categoryObj = ExerciseCategory.fromJson(json['category'] as Map<String, dynamic>);
|
||||
)..categoryObj =
|
||||
ExerciseCategory.fromJson(json['category'] as Map<String, dynamic>);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseToJson(Exercise instance) => <String, dynamic>{
|
||||
@@ -55,7 +56,8 @@ Map<String, dynamic> _$ExerciseToJson(Exercise instance) => <String, dynamic>{
|
||||
'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(),
|
||||
'comments': instance.tips.map((e) => e.toJson()).toList(),
|
||||
|
||||
@@ -20,7 +20,8 @@ ExerciseImage _$ExerciseImageFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseImageToJson(ExerciseImage instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseImageToJson(ExerciseImage instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'exercise_base': instance.exerciseBaseId,
|
||||
|
||||
@@ -22,7 +22,9 @@ MeasurementCategory _$MeasurementCategoryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$MeasurementCategoryToJson(MeasurementCategory instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$MeasurementCategoryToJson(
|
||||
MeasurementCategory instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
|
||||
@@ -13,7 +13,8 @@ IngredientWeightUnit _$IngredientWeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
return IngredientWeightUnit(
|
||||
id: json['id'] as int,
|
||||
weightUnit: WeightUnit.fromJson(json['weight_unit'] as Map<String, dynamic>),
|
||||
weightUnit:
|
||||
WeightUnit.fromJson(json['weight_unit'] as Map<String, dynamic>),
|
||||
ingredient: Ingredient.fromJson(json['ingredient'] as Map<String, dynamic>),
|
||||
grams: json['grams'] as int,
|
||||
amount: (json['amount'] as num).toDouble(),
|
||||
|
||||
@@ -9,7 +9,14 @@ part of 'log.dart';
|
||||
Log _$LogFromJson(Map<String, dynamic> 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?,
|
||||
|
||||
@@ -18,7 +18,8 @@ NutritionalPlan _$NutritionalPlanFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$NutritionalPlanToJson(NutritionalPlan instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$NutritionalPlanToJson(NutritionalPlan instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'description': instance.description,
|
||||
'creation_date': toDate(instance.creationDate),
|
||||
|
||||
@@ -17,7 +17,8 @@ WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -17,7 +17,8 @@ RepetitionUnit _$RepetitionUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$RepetitionUnitToJson(RepetitionUnit instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$RepetitionUnitToJson(RepetitionUnit instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -9,7 +9,14 @@ part of 'session.dart';
|
||||
WorkoutSession _$WorkoutSessionFromJson(Map<String, dynamic> 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<String, dynamic> json) {
|
||||
..timeEnd = stringToTime(json['time_end'] as String?);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WorkoutSessionToJson(WorkoutSession instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$WorkoutSessionToJson(WorkoutSession instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'workout': instance.workoutId,
|
||||
'date': toDate(instance.date),
|
||||
|
||||
@@ -17,7 +17,8 @@ WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -19,7 +19,8 @@ WorkoutPlan _$WorkoutPlanFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WorkoutPlanToJson(WorkoutPlan instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$WorkoutPlanToJson(WorkoutPlan instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'creation_date': instance.creationDate.toIso8601String(),
|
||||
'name': instance.name,
|
||||
|
||||
@@ -300,6 +300,13 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_barcode_scanner:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_barcode_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
flutter_calendar_carousel:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@@ -38,31 +38,33 @@ 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);
|
||||
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()) as _i2.AuthProvider);
|
||||
@override
|
||||
set auth(_i2.AuthProvider? _auth) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null);
|
||||
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()) as _i3.Client);
|
||||
@override
|
||||
set client(_i3.Client? _client) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null);
|
||||
super.noSuchMethod(Invocation.setter(#client, _client),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
(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<void> fetchAndSetGallery() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetGallery, []),
|
||||
@@ -84,43 +86,50 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i6.Future<void>);
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
Uri makeUrl(String? path,
|
||||
{int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
Invocation.method(#makeUrl, [path],
|
||||
{#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
returnValue: _FakeUri_2()) as Uri);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
_i6.Future<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#post, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i6.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#patch, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
@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>);
|
||||
returnValue: Future<_i3.Response>.value(_FakeResponse_3()))
|
||||
as _i6.Future<_i3.Response>);
|
||||
@override
|
||||
String toString() => super.toString();
|
||||
@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);
|
||||
@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);
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -20,36 +20,41 @@ import 'package:wger/providers/measurement.dart' as _i4;
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.Fake implements _i2.WgerBaseProvider {}
|
||||
class _FakeWgerBaseProvider_0 extends _i1.Fake implements _i2.WgerBaseProvider {
|
||||
}
|
||||
|
||||
class _FakeMeasurementCategory_1 extends _i1.Fake implements _i3.MeasurementCategory {}
|
||||
class _FakeMeasurementCategory_1 extends _i1.Fake
|
||||
implements _i3.MeasurementCategory {}
|
||||
|
||||
/// 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);
|
||||
(super.noSuchMethod(Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0()) as _i2.WgerBaseProvider);
|
||||
@override
|
||||
List<_i3.MeasurementCategory> get categories =>
|
||||
(super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i3.MeasurementCategory>[])
|
||||
(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);
|
||||
(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()) as _i3.MeasurementCategory);
|
||||
@override
|
||||
_i5.Future<void> fetchAndSetCategories() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetCategories, []),
|
||||
@@ -61,10 +66,10 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> fetchAndSetAllCategoriesAndEntries() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetAllCategoriesAndEntries, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i5.Future<void>);
|
||||
_i5.Future<void> fetchAndSetAllCategoriesAndEntries() => (super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllCategoriesAndEntries, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) =>
|
||||
(super.noSuchMethod(Invocation.method(#addCategory, [category]),
|
||||
@@ -77,7 +82,8 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
returnValueForMissingStub: Future<void>.value()) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> editCategory(int? id, String? newName, String? newUnit) =>
|
||||
(super.noSuchMethod(Invocation.method(#editCategory, [id, newName, newUnit]),
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editCategory, [id, newName, newUnit]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i5.Future<void>);
|
||||
@override
|
||||
@@ -91,25 +97,28 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> editEntry(
|
||||
int? id, int? categoryId, num? newValue, String? newNotes, DateTime? newDate) =>
|
||||
_i5.Future<void> editEntry(int? id, int? categoryId, num? newValue,
|
||||
String? newNotes, DateTime? newDate) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editEntry, [id, categoryId, newValue, newNotes, newDate]),
|
||||
Invocation.method(
|
||||
#editEntry, [id, categoryId, newValue, newNotes, newDate]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i5.Future<void>);
|
||||
@override
|
||||
String toString() => super.toString();
|
||||
@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);
|
||||
@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);
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -35,43 +35,49 @@ 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()) as _i2.AuthProvider);
|
||||
@override
|
||||
set auth(_i2.AuthProvider? _auth) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null);
|
||||
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()) as _i3.Client);
|
||||
@override
|
||||
set client(_i3.Client? _client) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null);
|
||||
super.noSuchMethod(Invocation.setter(#client, _client),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
Uri makeUrl(String? path,
|
||||
{int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
Invocation.method(#makeUrl, [path],
|
||||
{#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
returnValue: _FakeUri_2()) as Uri);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
_i5.Future<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#post, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#patch, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
@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>);
|
||||
returnValue: Future<_i3.Response>.value(_FakeResponse_3()))
|
||||
as _i5.Future<_i3.Response>);
|
||||
@override
|
||||
String toString() => super.toString();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,22 @@ import 'nutritional_plan_form_test.mocks.dart';
|
||||
|
||||
|
||||
void main() {
|
||||
|
||||
Ingredient ingr = Ingredient(
|
||||
id: 1,
|
||||
code: '123456787',
|
||||
name: 'Water',
|
||||
creationDate: DateTime(2021, 5, 1),
|
||||
energy: 500,
|
||||
carbohydrates: 10,
|
||||
carbohydratesSugar: 2,
|
||||
protein: 5,
|
||||
fat: 20,
|
||||
fatSaturated: 7,
|
||||
fibres: 12,
|
||||
sodium: 0.5,
|
||||
);
|
||||
|
||||
var mockNutrition = MockNutritionPlansProvider();
|
||||
final client = MockClient();
|
||||
final mockNutritionWithClient = NutritionPlansProvider(testAuthProvider, [], client);
|
||||
@@ -54,10 +70,10 @@ void main() {
|
||||
setUp(() {
|
||||
plan1 = getNutritionalPlan();
|
||||
meal1 = plan1.meals.first;
|
||||
final MealItem mealItem = MealItem(ingredientId: ingredient1.id, amount: 2);
|
||||
final MealItem mealItem = MealItem(ingredientId: ingr.id, amount: 2);
|
||||
mockNutrition = MockNutritionPlansProvider();
|
||||
|
||||
when(mockNutrition.searchIngredientWithCode('123')).thenAnswer((_) => Future.value(ingredient1));
|
||||
when(mockNutrition.searchIngredientWithCode('123')).thenAnswer((_) => Future.value(ingr));
|
||||
when(mockNutrition.searchIngredientWithCode('')).thenAnswer((_) => Future.value(null));
|
||||
when(mockNutrition.searchIngredientWithCode('222')).thenAnswer((_) => Future.value(null));
|
||||
when(mockNutrition.searchIngredient(any)).thenAnswer((_) => Future.value(json.decode(fixture('ingredient_suggestions')) as List<dynamic>));
|
||||
|
||||
@@ -42,38 +42,41 @@ class _FakeResponse_7 extends _i1.Fake 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);
|
||||
}
|
||||
|
||||
@override
|
||||
List<_i4.NutritionalPlan> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i4.NutritionalPlan>[])
|
||||
as List<_i4.NutritionalPlan>);
|
||||
(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()) as _i2.AuthProvider);
|
||||
@override
|
||||
set auth(_i2.AuthProvider? _auth) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null);
|
||||
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()) as _i3.Client);
|
||||
@override
|
||||
set client(_i3.Client? _client) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null);
|
||||
super.noSuchMethod(Invocation.setter(#client, _client),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
(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);
|
||||
(super.noSuchMethod(Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeNutritionalPlan_2()) as _i4.NutritionalPlan);
|
||||
@override
|
||||
_i5.Meal? findMealById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?);
|
||||
@@ -90,17 +93,20 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetPlanSparse, [planId]),
|
||||
returnValue: Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2()))
|
||||
returnValue:
|
||||
Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2()))
|
||||
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()))
|
||||
returnValue:
|
||||
Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2()))
|
||||
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()))
|
||||
returnValue:
|
||||
Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2()))
|
||||
as _i9.Future<_i4.NutritionalPlan>);
|
||||
@override
|
||||
_i9.Future<void> editPlan(_i4.NutritionalPlan? plan) =>
|
||||
@@ -108,26 +114,31 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i9.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> deletePlan(int? id) => (super.noSuchMethod(Invocation.method(#deletePlan, [id]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i9.Future<void>);
|
||||
_i9.Future<void> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#deletePlan, [id]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i9.Future<void>);
|
||||
@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>);
|
||||
returnValue: Future<_i5.Meal>.value(_FakeMeal_3()))
|
||||
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>);
|
||||
returnValue: Future<_i5.Meal>.value(_FakeMeal_3()))
|
||||
as _i9.Future<_i5.Meal>);
|
||||
@override
|
||||
_i9.Future<void> deleteMeal(_i5.Meal? meal) =>
|
||||
(super.noSuchMethod(Invocation.method(#deleteMeal, [meal]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i9.Future<void>);
|
||||
@override
|
||||
_i9.Future<_i6.MealItem> addMealItem(_i6.MealItem? mealItem, _i5.Meal? meal) =>
|
||||
_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>);
|
||||
returnValue: Future<_i6.MealItem>.value(_FakeMealItem_4()))
|
||||
as _i9.Future<_i6.MealItem>);
|
||||
@override
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(Invocation.method(#deleteMealItem, [mealItem]),
|
||||
@@ -144,17 +155,27 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i9.Future<void>);
|
||||
@override
|
||||
_i9.Future<List<dynamic>> searchIngredient(String? name, [String? languageCode = r'en']) =>
|
||||
(super.noSuchMethod(Invocation.method(#searchIngredient, [name, languageCode]),
|
||||
returnValue: Future<List<dynamic>>.value(<dynamic>[])) as _i9.Future<List<dynamic>>);
|
||||
_i9.Future<List<dynamic>> searchIngredient(String? name,
|
||||
[String? languageCode = r'en']) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#searchIngredient, [name, languageCode]),
|
||||
returnValue: Future<List<dynamic>>.value(<dynamic>[]))
|
||||
as _i9.Future<List<dynamic>>);
|
||||
@override
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(Invocation.method(#searchIngredientWithCode, [code]),
|
||||
returnValue: Future<_i7.Ingredient?>.value())
|
||||
as _i9.Future<_i7.Ingredient?>);
|
||||
@override
|
||||
_i9.Future<void> logMealToDiary(_i5.Meal? meal) =>
|
||||
(super.noSuchMethod(Invocation.method(#logMealToDiary, [meal]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i9.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> logIngredentToDiary(_i6.MealItem? mealItem, int? planId, [DateTime? dateTime]) =>
|
||||
(super.noSuchMethod(Invocation.method(#logIngredentToDiary, [mealItem, planId, dateTime]),
|
||||
_i9.Future<void> logIngredentToDiary(_i6.MealItem? mealItem, int? planId,
|
||||
[DateTime? dateTime]) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#logIngredentToDiary, [mealItem, planId, dateTime]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i9.Future<void>);
|
||||
@override
|
||||
@@ -168,43 +189,50 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i9.Future<void>);
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
Uri makeUrl(String? path,
|
||||
{int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
Invocation.method(#makeUrl, [path],
|
||||
{#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
returnValue: _FakeUri_6()) as Uri);
|
||||
@override
|
||||
_i9.Future<Map<String, dynamic>> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i9.Future<Map<String, dynamic>>);
|
||||
_i9.Future<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i9.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i9.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#post, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i9.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i9.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i9.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#patch, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i9.Future<Map<String, dynamic>>);
|
||||
@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>);
|
||||
returnValue: Future<_i3.Response>.value(_FakeResponse_7()))
|
||||
as _i9.Future<_i3.Response>);
|
||||
@override
|
||||
String toString() => super.toString();
|
||||
@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);
|
||||
@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);
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ import 'package:mockito/mockito.dart' as _i1;
|
||||
|
||||
class _FakeResponse_0 extends _i1.Fake implements _i2.Response {}
|
||||
|
||||
class _FakeStreamedResponse_1 extends _i1.Fake implements _i3.StreamedResponse {}
|
||||
class _FakeStreamedResponse_1 extends _i1.Fake implements _i3.StreamedResponse {
|
||||
}
|
||||
|
||||
/// A class which mocks [Client].
|
||||
///
|
||||
@@ -36,51 +37,73 @@ class MockClient extends _i1.Mock implements _i4.Client {
|
||||
@override
|
||||
_i5.Future<_i2.Response> head(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(Invocation.method(#head, [url], {#headers: headers}),
|
||||
returnValue: Future<_i2.Response>.value(_FakeResponse_0())) as _i5.Future<_i2.Response>);
|
||||
returnValue: Future<_i2.Response>.value(_FakeResponse_0()))
|
||||
as _i5.Future<_i2.Response>);
|
||||
@override
|
||||
_i5.Future<_i2.Response> get(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(Invocation.method(#get, [url], {#headers: headers}),
|
||||
returnValue: Future<_i2.Response>.value(_FakeResponse_0())) as _i5.Future<_i2.Response>);
|
||||
returnValue: Future<_i2.Response>.value(_FakeResponse_0()))
|
||||
as _i5.Future<_i2.Response>);
|
||||
@override
|
||||
_i5.Future<_i2.Response> post(Uri? url,
|
||||
{Map<String, String>? headers, Object? body, _i6.Encoding? encoding}) =>
|
||||
{Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i6.Encoding? encoding}) =>
|
||||
(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(#post, [url],
|
||||
{#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: Future<_i2.Response>.value(_FakeResponse_0()))
|
||||
as _i5.Future<_i2.Response>);
|
||||
@override
|
||||
_i5.Future<_i2.Response> put(Uri? url,
|
||||
{Map<String, String>? headers, Object? body, _i6.Encoding? encoding}) =>
|
||||
{Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i6.Encoding? encoding}) =>
|
||||
(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(#put, [url],
|
||||
{#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: Future<_i2.Response>.value(_FakeResponse_0()))
|
||||
as _i5.Future<_i2.Response>);
|
||||
@override
|
||||
_i5.Future<_i2.Response> patch(Uri? url,
|
||||
{Map<String, String>? headers, Object? body, _i6.Encoding? encoding}) =>
|
||||
{Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i6.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(#patch, [url],
|
||||
{#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: Future<_i2.Response>.value(_FakeResponse_0()))
|
||||
as _i5.Future<_i2.Response>);
|
||||
@override
|
||||
_i5.Future<_i2.Response> delete(Uri? url,
|
||||
{Map<String, String>? headers, Object? body, _i6.Encoding? encoding}) =>
|
||||
{Map<String, String>? headers,
|
||||
Object? body,
|
||||
_i6.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(#delete, [url],
|
||||
{#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: Future<_i2.Response>.value(_FakeResponse_0()))
|
||||
as _i5.Future<_i2.Response>);
|
||||
@override
|
||||
_i5.Future<String> read(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: Future<String>.value('')) as _i5.Future<String>);
|
||||
@override
|
||||
_i5.Future<_i7.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(Invocation.method(#readBytes, [url], {#headers: headers}),
|
||||
returnValue: Future<_i7.Uint8List>.value(_i7.Uint8List(0))) as _i5.Future<_i7.Uint8List>);
|
||||
_i5.Future<_i7.Uint8List> readBytes(Uri? url,
|
||||
{Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#readBytes, [url], {#headers: headers}),
|
||||
returnValue: Future<_i7.Uint8List>.value(_i7.Uint8List(0)))
|
||||
as _i5.Future<_i7.Uint8List>);
|
||||
@override
|
||||
_i5.Future<_i3.StreamedResponse> send(_i8.BaseRequest? request) =>
|
||||
(super.noSuchMethod(Invocation.method(#send, [request]),
|
||||
returnValue: Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_1()))
|
||||
returnValue:
|
||||
Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_1()))
|
||||
as _i5.Future<_i3.StreamedResponse>);
|
||||
@override
|
||||
void close() =>
|
||||
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
|
||||
void close() => super.noSuchMethod(Invocation.method(#close, []),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
String toString() => super.toString();
|
||||
}
|
||||
|
||||
@@ -55,73 +55,79 @@ class _FakeResponse_11 extends _i1.Fake 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);
|
||||
}
|
||||
|
||||
@override
|
||||
List<_i6.WorkoutPlan> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i6.WorkoutPlan>[])
|
||||
as List<_i6.WorkoutPlan>);
|
||||
(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>);
|
||||
(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);
|
||||
(super.noSuchMethod(Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_0()) as _i2.WeightUnit);
|
||||
@override
|
||||
List<_i3.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i3.RepetitionUnit>[])
|
||||
as List<_i3.RepetitionUnit>);
|
||||
(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);
|
||||
@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()) as _i4.AuthProvider);
|
||||
@override
|
||||
set auth(_i4.AuthProvider? _auth) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null);
|
||||
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()) as _i5.Client);
|
||||
@override
|
||||
set client(_i5.Client? _client) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null);
|
||||
super.noSuchMethod(Invocation.setter(#client, _client),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
(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);
|
||||
(super.noSuchMethod(Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeWorkoutPlan_4()) 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);
|
||||
super.noSuchMethod(Invocation.method(#setCurrentPlan, [id]),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
void resetCurrentPlan() =>
|
||||
super.noSuchMethod(Invocation.method(#resetCurrentPlan, []), returnValueForMissingStub: null);
|
||||
super.noSuchMethod(Invocation.method(#resetCurrentPlan, []),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllPlansFull() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
_i13.Future<void> fetchAndSetAllPlansFull() => (super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllPlansSparse() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
_i13.Future<void> fetchAndSetAllPlansSparse() => (super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<_i6.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetPlanSparse, [planId]),
|
||||
@@ -129,7 +135,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i12.WorkoutPlansProv
|
||||
as _i13.Future<_i6.WorkoutPlan>);
|
||||
@override
|
||||
_i13.Future<_i6.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]),
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWorkoutPlanFull, [workoutId]),
|
||||
returnValue: Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan_4()))
|
||||
as _i13.Future<_i6.WorkoutPlan>);
|
||||
@override
|
||||
@@ -140,78 +147,89 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i12.WorkoutPlansProv
|
||||
@override
|
||||
_i13.Future<void> editWorkout(_i6.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(Invocation.method(#editWorkout, [workout]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value())
|
||||
as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<void> deleteWorkout(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#deleteWorkout, [id]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
_i13.Future<void> deleteWorkout(int? id) => (super.noSuchMethod(
|
||||
Invocation.method(#deleteWorkout, [id]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<Map<String, dynamic>> fetchLogData(
|
||||
_i6.WorkoutPlan? workout, _i14.Exercise? exercise) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchLogData, [workout, exercise]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i13.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@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>);
|
||||
@override
|
||||
_i13.Future<void> editDay(_i7.Day? day) => (super.noSuchMethod(Invocation.method(#editDay, [day]),
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<void> deleteDay(_i7.Day? day) =>
|
||||
(super.noSuchMethod(Invocation.method(#deleteDay, [day]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
_i13.Future<void> fetchAndSetWeightUnits() => (super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() => (super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@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>);
|
||||
@override
|
||||
_i13.Future<void> editDay(_i7.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<void> deleteDay(_i7.Day? day) => (super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [day]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@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>);
|
||||
returnValue: Future<_i8.Set>.value(_FakeSet_6()))
|
||||
as _i13.Future<_i8.Set>);
|
||||
@override
|
||||
_i13.Future<void> editSet(_i8.Set? workoutSet) =>
|
||||
(super.noSuchMethod(Invocation.method(#editSet, [workoutSet]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
_i13.Future<void> editSet(_i8.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(#editSet, [workoutSet]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<List<_i8.Set>> reorderSets(List<_i8.Set>? sets, int? startIndex) =>
|
||||
_i13.Future<List<_i8.Set>> reorderSets(
|
||||
List<_i8.Set>? sets, int? startIndex) =>
|
||||
(super.noSuchMethod(Invocation.method(#reorderSets, [sets, startIndex]),
|
||||
returnValue: Future<List<_i8.Set>>.value(<_i8.Set>[])) as _i13.Future<List<_i8.Set>>);
|
||||
returnValue: Future<List<_i8.Set>>.value(<_i8.Set>[]))
|
||||
as _i13.Future<List<_i8.Set>>);
|
||||
@override
|
||||
_i13.Future<void> fetchComputedSettings(_i8.Set? workoutSet) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchComputedSettings, [workoutSet]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
_i13.Future<void> fetchComputedSettings(_i8.Set? workoutSet) => (super
|
||||
.noSuchMethod(Invocation.method(#fetchComputedSettings, [workoutSet]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value())
|
||||
as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<String> fetchSmartText(_i8.Set? workoutSet, _i14.Exercise? exercise) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchSmartText, [workoutSet, exercise]),
|
||||
_i13.Future<String> fetchSmartText(
|
||||
_i8.Set? workoutSet, _i14.Exercise? exercise) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSmartText, [workoutSet, exercise]),
|
||||
returnValue: Future<String>.value('')) as _i13.Future<String>);
|
||||
@override
|
||||
_i13.Future<void> deleteSet(_i8.Set? workoutSet) =>
|
||||
(super.noSuchMethod(Invocation.method(#deleteSet, [workoutSet]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
_i13.Future<void> deleteSet(_i8.Set? workoutSet) => (super.noSuchMethod(
|
||||
Invocation.method(#deleteSet, [workoutSet]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@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>);
|
||||
returnValue: Future<_i9.Setting>.value(_FakeSetting_7()))
|
||||
as _i13.Future<_i9.Setting>);
|
||||
@override
|
||||
_i13.Future<dynamic> fetchSessionData() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchSessionData, []),
|
||||
@@ -219,55 +237,65 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i12.WorkoutPlansProv
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(Invocation.method(#addSession, [session]),
|
||||
returnValue: Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8()))
|
||||
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>);
|
||||
returnValue: Future<_i11.Log>.value(_FakeLog_9()))
|
||||
as _i13.Future<_i11.Log>);
|
||||
@override
|
||||
_i13.Future<void> deleteLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(Invocation.method(#deleteLog, [log]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
_i13.Future<void> deleteLog(_i11.Log? log) => (super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [log]),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i13.Future<void>);
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
Uri makeUrl(String? path,
|
||||
{int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
Invocation.method(#makeUrl, [path],
|
||||
{#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
returnValue: _FakeUri_10()) as Uri);
|
||||
@override
|
||||
_i13.Future<Map<String, dynamic>> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i13.Future<Map<String, dynamic>>);
|
||||
_i13.Future<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i13.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i13.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i13.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#post, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i13.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i13.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i13.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#patch, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i13.Future<Map<String, dynamic>>);
|
||||
@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<_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>);
|
||||
@override
|
||||
String toString() => super.toString();
|
||||
@override
|
||||
void addListener(_i15.VoidCallback? listener) => super
|
||||
.noSuchMethod(Invocation.method(#addListener, [listener]), 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);
|
||||
void dispose() => super.noSuchMethod(Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -39,29 +39,30 @@ 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()) as _i2.AuthProvider);
|
||||
@override
|
||||
set auth(_i2.AuthProvider? _auth) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, _auth), returnValueForMissingStub: null);
|
||||
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()) as _i3.Client);
|
||||
@override
|
||||
set client(_i3.Client? _client) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, _client), returnValueForMissingStub: null);
|
||||
super.noSuchMethod(Invocation.setter(#client, _client),
|
||||
returnValueForMissingStub: null);
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
(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()) as _i4.Exercise);
|
||||
@override
|
||||
_i6.Future<void> fetchAndSetCategories() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetCategories, []),
|
||||
@@ -80,54 +81,65 @@ class MockExercisesProvider extends _i1.Mock implements _i5.ExercisesProvider {
|
||||
@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>);
|
||||
returnValue: Future<_i4.Exercise>.value(_FakeExercise_2()))
|
||||
as _i6.Future<_i4.Exercise>);
|
||||
@override
|
||||
_i6.Future<void> fetchAndSetExercises() =>
|
||||
(super.noSuchMethod(Invocation.method(#fetchAndSetExercises, []),
|
||||
returnValue: Future<void>.value(),
|
||||
returnValueForMissingStub: Future<void>.value()) as _i6.Future<void>);
|
||||
@override
|
||||
_i6.Future<List<dynamic>> searchExercise(String? name, [String? languageCode = r'en']) =>
|
||||
(super.noSuchMethod(Invocation.method(#searchExercise, [name, languageCode]),
|
||||
returnValue: Future<List<dynamic>>.value(<dynamic>[])) as _i6.Future<List<dynamic>>);
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
_i6.Future<List<dynamic>> searchExercise(String? name,
|
||||
[String? languageCode = r'en']) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
Invocation.method(#searchExercise, [name, languageCode]),
|
||||
returnValue: Future<List<dynamic>>.value(<dynamic>[]))
|
||||
as _i6.Future<List<dynamic>>);
|
||||
@override
|
||||
Uri makeUrl(String? path,
|
||||
{int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#makeUrl, [path],
|
||||
{#id: id, #objectMethod: objectMethod, #query: query}),
|
||||
returnValue: _FakeUri_3()) as Uri);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
_i6.Future<Map<String, dynamic>> fetch(Uri? uri) => (super.noSuchMethod(
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#post, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i6.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(Invocation.method(#patch, [data, uri]),
|
||||
returnValue: Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
returnValue:
|
||||
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
@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>);
|
||||
returnValue: Future<_i3.Response>.value(_FakeResponse_4()))
|
||||
as _i6.Future<_i3.Response>);
|
||||
@override
|
||||
String toString() => super.toString();
|
||||
@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);
|
||||
@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);
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user