mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-28 17:08:29 +01:00
Update models to work with new keys
creation_date was renamed to created and update_date to last_updated
This commit is contained in:
@@ -22,7 +22,7 @@ Widget createNutritionalPlanScreen({locale = 'en'}) {
|
||||
id: 1,
|
||||
code: '123456787',
|
||||
name: 'Müsli',
|
||||
creationDate: DateTime(2021, 5, 1),
|
||||
created: DateTime(2021, 5, 1),
|
||||
energy: 500,
|
||||
carbohydrates: 10,
|
||||
carbohydratesSugar: 2,
|
||||
@@ -36,7 +36,7 @@ Widget createNutritionalPlanScreen({locale = 'en'}) {
|
||||
id: 1,
|
||||
code: '123456787',
|
||||
name: 'Milk',
|
||||
creationDate: DateTime(2021, 5, 1),
|
||||
created: DateTime(2021, 5, 1),
|
||||
energy: 500,
|
||||
carbohydrates: 10,
|
||||
carbohydratesSugar: 2,
|
||||
@@ -50,7 +50,7 @@ Widget createNutritionalPlanScreen({locale = 'en'}) {
|
||||
id: 1,
|
||||
code: '123456787',
|
||||
name: 'Apple',
|
||||
creationDate: DateTime(2021, 5, 1),
|
||||
created: DateTime(2021, 5, 1),
|
||||
energy: 500,
|
||||
carbohydrates: 10,
|
||||
carbohydratesSugar: 2,
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -39,11 +39,11 @@ class ExerciseBase extends Equatable {
|
||||
@JsonKey(required: true, name: 'variations')
|
||||
final int? variationId;
|
||||
|
||||
@JsonKey(required: true, name: 'creation_date')
|
||||
final DateTime? creationDate;
|
||||
@JsonKey(required: true, name: 'created')
|
||||
final DateTime? created;
|
||||
|
||||
@JsonKey(required: true, name: 'update_date')
|
||||
final DateTime? updateDate;
|
||||
@JsonKey(required: true, name: 'last_update')
|
||||
final DateTime? lastUpdate;
|
||||
|
||||
@JsonKey(required: true, name: 'category')
|
||||
late int categoryId;
|
||||
@@ -81,8 +81,8 @@ class ExerciseBase extends Equatable {
|
||||
ExerciseBase({
|
||||
this.id,
|
||||
this.uuid,
|
||||
this.creationDate,
|
||||
this.updateDate,
|
||||
this.created,
|
||||
this.lastUpdate,
|
||||
this.variationId,
|
||||
List<Muscle>? muscles,
|
||||
List<Muscle>? musclesSecondary,
|
||||
@@ -115,7 +115,7 @@ class ExerciseBase extends Equatable {
|
||||
}
|
||||
|
||||
if (exercises != null) {
|
||||
this.translations = exercises;
|
||||
translations = exercises;
|
||||
}
|
||||
|
||||
if (videos != null) {
|
||||
@@ -166,8 +166,8 @@ class ExerciseBase extends Equatable {
|
||||
List<Object?> get props => [
|
||||
id,
|
||||
uuid,
|
||||
creationDate,
|
||||
updateDate,
|
||||
created,
|
||||
lastUpdate,
|
||||
category,
|
||||
equipment,
|
||||
muscles,
|
||||
|
||||
@@ -13,8 +13,8 @@ ExerciseBase _$ExerciseBaseFromJson(Map<String, dynamic> json) {
|
||||
'id',
|
||||
'uuid',
|
||||
'variations',
|
||||
'creation_date',
|
||||
'update_date',
|
||||
'created',
|
||||
'last_update',
|
||||
'category',
|
||||
'muscles',
|
||||
'muscles_secondary',
|
||||
@@ -24,24 +24,31 @@ ExerciseBase _$ExerciseBaseFromJson(Map<String, dynamic> json) {
|
||||
return ExerciseBase(
|
||||
id: json['id'] as int?,
|
||||
uuid: json['uuid'] as String?,
|
||||
creationDate:
|
||||
json['creation_date'] == null ? null : DateTime.parse(json['creation_date'] as String),
|
||||
updateDate: json['update_date'] == null ? null : DateTime.parse(json['update_date'] as String),
|
||||
created: json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String),
|
||||
lastUpdate: json['last_update'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_update'] as String),
|
||||
variationId: json['variations'] as int?,
|
||||
)
|
||||
..categoryId = json['category'] as int
|
||||
..musclesIds = (json['muscles'] as List<dynamic>).map((e) => e as int).toList()
|
||||
..musclesSecondaryIds =
|
||||
(json['muscles_secondary'] as List<dynamic>).map((e) => e as int).toList()
|
||||
..equipmentIds = (json['equipment'] as List<dynamic>).map((e) => e as int).toList();
|
||||
..musclesIds =
|
||||
(json['muscles'] as List<dynamic>).map((e) => e as int).toList()
|
||||
..musclesSecondaryIds = (json['muscles_secondary'] as List<dynamic>)
|
||||
.map((e) => e as int)
|
||||
.toList()
|
||||
..equipmentIds =
|
||||
(json['equipment'] as List<dynamic>).map((e) => e as int).toList();
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$ExerciseBaseToJson(ExerciseBase instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$ExerciseBaseToJson(ExerciseBase instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'variations': instance.variationId,
|
||||
'creation_date': instance.creationDate?.toIso8601String(),
|
||||
'update_date': instance.updateDate?.toIso8601String(),
|
||||
'created': instance.created?.toIso8601String(),
|
||||
'last_update': instance.lastUpdate?.toIso8601String(),
|
||||
'category': instance.categoryId,
|
||||
'muscles': instance.musclesIds,
|
||||
'muscles_secondary': instance.musclesSecondaryIds,
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -39,8 +39,8 @@ class Translation extends Equatable {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
late Language languageObj;
|
||||
|
||||
@JsonKey(required: true, name: 'creation_date')
|
||||
final DateTime? creationDate;
|
||||
@JsonKey(required: true, name: 'created')
|
||||
final DateTime? created;
|
||||
|
||||
@JsonKey(required: true, name: 'exercise_base')
|
||||
late int? baseId;
|
||||
@@ -60,7 +60,7 @@ class Translation extends Equatable {
|
||||
Translation({
|
||||
this.id,
|
||||
this.uuid,
|
||||
this.creationDate,
|
||||
this.created,
|
||||
required this.name,
|
||||
required this.description,
|
||||
int? baseId,
|
||||
@@ -96,7 +96,7 @@ class Translation extends Equatable {
|
||||
baseId,
|
||||
uuid,
|
||||
languageId,
|
||||
creationDate,
|
||||
created,
|
||||
name,
|
||||
description,
|
||||
];
|
||||
|
||||
@@ -13,7 +13,7 @@ Translation _$TranslationFromJson(Map<String, dynamic> json) {
|
||||
'id',
|
||||
'uuid',
|
||||
'language',
|
||||
'creation_date',
|
||||
'created',
|
||||
'exercise_base',
|
||||
'name',
|
||||
'description'
|
||||
@@ -22,19 +22,21 @@ Translation _$TranslationFromJson(Map<String, dynamic> json) {
|
||||
return Translation(
|
||||
id: json['id'] as int?,
|
||||
uuid: json['uuid'] as String?,
|
||||
creationDate:
|
||||
json['creation_date'] == null ? null : DateTime.parse(json['creation_date'] as String),
|
||||
created: json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String),
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
baseId: json['exercise_base'] as int?,
|
||||
)..languageId = json['language'] as int;
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$TranslationToJson(Translation instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$TranslationToJson(Translation instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'language': instance.languageId,
|
||||
'creation_date': instance.creationDate?.toIso8601String(),
|
||||
'created': instance.created?.toIso8601String(),
|
||||
'exercise_base': instance.baseId,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -20,7 +20,8 @@ MeasurementEntry _$MeasurementEntryFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$MeasurementEntryToJson(MeasurementEntry instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$MeasurementEntryToJson(MeasurementEntry instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'category': instance.category,
|
||||
'date': toDate(instance.date),
|
||||
|
||||
@@ -38,7 +38,8 @@ IngredientImage _$IngredientImageFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientImageToJson(IngredientImage instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$IngredientImageToJson(IngredientImage instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uuid': instance.uuid,
|
||||
'ingredient_id': instance.ingredientId,
|
||||
|
||||
@@ -34,8 +34,8 @@ class Ingredient {
|
||||
@JsonKey(required: true)
|
||||
final String name;
|
||||
|
||||
@JsonKey(required: true, name: 'creation_date')
|
||||
final DateTime creationDate;
|
||||
@JsonKey(required: true, name: 'created')
|
||||
final DateTime created;
|
||||
|
||||
/// Energy in kJ per 100g of product
|
||||
@JsonKey(required: true)
|
||||
@@ -75,7 +75,7 @@ class Ingredient {
|
||||
required this.id,
|
||||
required this.code,
|
||||
required this.name,
|
||||
required this.creationDate,
|
||||
required this.created,
|
||||
required this.energy,
|
||||
required this.carbohydrates,
|
||||
required this.carbohydratesSugar,
|
||||
@@ -89,5 +89,6 @@ class Ingredient {
|
||||
|
||||
// Boilerplate
|
||||
factory Ingredient.fromJson(Map<String, dynamic> json) => _$IngredientFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$IngredientToJson(this);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
'id',
|
||||
'code',
|
||||
'name',
|
||||
'creation_date',
|
||||
'created',
|
||||
'energy',
|
||||
'carbohydrates',
|
||||
'carbohydrates_sugar',
|
||||
@@ -28,7 +28,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
id: json['id'] as int,
|
||||
code: json['code'] as String?,
|
||||
name: json['name'] as String,
|
||||
creationDate: DateTime.parse(json['creation_date'] as String),
|
||||
created: DateTime.parse(json['created'] as String),
|
||||
energy: json['energy'] as int,
|
||||
carbohydrates: stringToNum(json['carbohydrates'] as String?),
|
||||
carbohydratesSugar: stringToNum(json['carbohydrates_sugar'] as String?),
|
||||
@@ -43,11 +43,12 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientToJson(Ingredient instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$IngredientToJson(Ingredient instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'code': instance.code,
|
||||
'name': instance.name,
|
||||
'creation_date': instance.creationDate.toIso8601String(),
|
||||
'created': instance.created.toIso8601String(),
|
||||
'energy': instance.energy,
|
||||
'carbohydrates': numToString(instance.carbohydrates),
|
||||
'carbohydrates_sugar': numToString(instance.carbohydratesSugar),
|
||||
|
||||
@@ -13,14 +13,16 @@ 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(),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IngredientWeightUnitToJson(IngredientWeightUnit instance) =>
|
||||
Map<String, dynamic> _$IngredientWeightUnitToJson(
|
||||
IngredientWeightUnit instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'weight_unit': instance.weightUnit,
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -9,7 +9,12 @@ part of 'profile.dart';
|
||||
Profile _$ProfileFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const ['username', 'email_verified', 'is_trustworthy', 'email'],
|
||||
requiredKeys: const [
|
||||
'username',
|
||||
'email_verified',
|
||||
'is_trustworthy',
|
||||
'email'
|
||||
],
|
||||
);
|
||||
return Profile(
|
||||
username: json['username'] as String,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -325,7 +325,7 @@ class ExercisesProvider with ChangeNotifier {
|
||||
final exerciseBase = ExerciseBase(
|
||||
id: baseData['id'],
|
||||
uuid: baseData['uuid'],
|
||||
creationDate: null,
|
||||
created: null,
|
||||
//creationDate: toDate(baseData['creation_date']),
|
||||
musclesSecondary: musclesSecondary.cast<Muscle>(),
|
||||
muscles: musclesPrimary.cast<Muscle>(),
|
||||
|
||||
@@ -85,13 +85,19 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
|
||||
|
||||
// Base data
|
||||
log('Loading base data');
|
||||
await Future.wait([
|
||||
authProvider.setServerVersion(),
|
||||
userProvider.fetchAndSetProfile(),
|
||||
workoutPlansProvider.fetchAndSetUnits(),
|
||||
nutritionPlansProvider.fetchIngredientsFromCache(),
|
||||
exercisesProvider.fetchAndSetExercises(),
|
||||
]);
|
||||
try {
|
||||
await Future.wait([
|
||||
authProvider.setServerVersion(),
|
||||
userProvider.fetchAndSetProfile(),
|
||||
workoutPlansProvider.fetchAndSetUnits(),
|
||||
nutritionPlansProvider.fetchIngredientsFromCache(),
|
||||
exercisesProvider.fetchAndSetExercises(),
|
||||
]);
|
||||
}
|
||||
catch (e) {
|
||||
log('fire! fire!');
|
||||
log(e.toString());
|
||||
}
|
||||
|
||||
// Plans, weight and gallery
|
||||
log('Loading plans, weight, measurements and gallery');
|
||||
@@ -143,8 +149,13 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
|
||||
),
|
||||
),
|
||||
Text(
|
||||
AppLocalizations.of(context).loadingText,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
AppLocalizations
|
||||
.of(context)
|
||||
.loadingText,
|
||||
style: Theme
|
||||
.of(context)
|
||||
.textTheme
|
||||
.headline5,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -157,26 +168,36 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.dashboard),
|
||||
label: AppLocalizations.of(context).labelDashboard,
|
||||
label: AppLocalizations
|
||||
.of(context)
|
||||
.labelDashboard,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.fitness_center),
|
||||
label: AppLocalizations.of(context).labelBottomNavWorkout,
|
||||
label: AppLocalizations
|
||||
.of(context)
|
||||
.labelBottomNavWorkout,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.restaurant),
|
||||
label: AppLocalizations.of(context).labelBottomNavNutrition,
|
||||
label: AppLocalizations
|
||||
.of(context)
|
||||
.labelBottomNavNutrition,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const FaIcon(
|
||||
FontAwesomeIcons.weightScale,
|
||||
size: 20,
|
||||
),
|
||||
label: AppLocalizations.of(context).weight,
|
||||
label: AppLocalizations
|
||||
.of(context)
|
||||
.weight,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.photo_library),
|
||||
label: AppLocalizations.of(context).gallery,
|
||||
label: AppLocalizations
|
||||
.of(context)
|
||||
.gallery,
|
||||
),
|
||||
],
|
||||
type: BottomNavigationBarType.fixed,
|
||||
|
||||
@@ -32,7 +32,8 @@ import 'package:wger/providers/user.dart' as _i15;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -85,7 +86,8 @@ class _FakeAlias_4 extends _i1.SmartFake implements _i6.Alias {
|
||||
/// A class which mocks [AddExerciseProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvider {
|
||||
class MockAddExerciseProvider extends _i1.Mock
|
||||
implements _i7.AddExerciseProvider {
|
||||
MockAddExerciseProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -342,7 +344,8 @@ class MockAddExerciseProvider extends _i1.Mock implements _i7.AddExerciseProvide
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
) as _i13.Future<void>);
|
||||
@override
|
||||
_i13.Future<_i4.Translation> addExerciseTranslation(_i4.Translation? exercise) =>
|
||||
_i13.Future<_i4.Translation> addExerciseTranslation(
|
||||
_i4.Translation? exercise) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExerciseTranslation,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"id": 9,
|
||||
"uuid": "1b020b3a-3732-4c7e-92fd-a0cec90ed69b",
|
||||
"created": "2023-08-06T11:20:14.368566+02:00",
|
||||
"last_update": "2023-04-22T12:18:33.904542+02:00",
|
||||
"last_update_global": "2023-04-22T12:18:33.907201+02:00",
|
||||
"category": {
|
||||
"id": 10,
|
||||
"name": "Abs"
|
||||
@@ -152,7 +155,7 @@
|
||||
"comment": "have fun"
|
||||
}
|
||||
],
|
||||
"creation_date": "2015-08-03",
|
||||
"created": "2015-08-03T18:22:54.909478+02:00",
|
||||
"language": 2,
|
||||
"license": 2,
|
||||
"license_author": "deusinvictus"
|
||||
@@ -181,7 +184,7 @@
|
||||
"comment": "pasatelo bien!"
|
||||
}
|
||||
],
|
||||
"creation_date": "2022-03-14",
|
||||
"created": "2022-03-14T18:22:54.909478+02:00",
|
||||
"language": 3,
|
||||
"license": 2,
|
||||
"license_author": "tester McTestface"
|
||||
@@ -200,7 +203,7 @@
|
||||
"comment": "mach die Übung richtig"
|
||||
}
|
||||
],
|
||||
"creation_date": "2022-03-14",
|
||||
"created": "2022-03-14T18:22:54.909478+02:00",
|
||||
"language": 1,
|
||||
"license": 2,
|
||||
"license_author": "tester McTestface"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"id": 10065,
|
||||
"code": "0043647440020",
|
||||
"name": "'Old Times' Orange Fine Cut Marmalade",
|
||||
"creation_date": "2020-12-20T01:00:00+01:00",
|
||||
"update_date": "2022-08-09T10:23:11+02:00",
|
||||
"created": "2020-12-20T01:00:00+01:00",
|
||||
"last_update": "2022-08-09T10:23:11+02:00",
|
||||
"energy": 269,
|
||||
"protein": "0.000",
|
||||
"carbohydrates": "67.000",
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"id": 58300,
|
||||
"code": "4071800000992",
|
||||
"name": "1688 Mehrkorn",
|
||||
"creation_date": "2020-12-20T01:00:00+02:00",
|
||||
"update_date": "2022-08-09T18:55:00+02:00",
|
||||
"created": "2020-12-20T01:00:00+02:00",
|
||||
"last_update": "2022-08-09T18:55:00+02:00",
|
||||
"energy": 229,
|
||||
"protein": "7.680",
|
||||
"carbohydrates": "35.700",
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"id": 59887,
|
||||
"code": "4311501354155",
|
||||
"name": "Baked Beans",
|
||||
"creation_date": "2020-12-20T23:10:54+01:00",
|
||||
"update_date": "2022-08-09T13:32:41+01:00",
|
||||
"created": "2020-12-20T23:10:54+01:00",
|
||||
"last_update": "2022-08-09T13:32:41+01:00",
|
||||
"energy": 86,
|
||||
"protein": "4.400",
|
||||
"carbohydrates": "11.000",
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
"id": 59887,
|
||||
"code": "4311501354155",
|
||||
"name": "Baked Beans",
|
||||
"creation_date": "2020-12-20",
|
||||
"update_date": "2022-08-09",
|
||||
"created": "2020-12-20",
|
||||
"last_update": "2022-08-09",
|
||||
"energy": 86,
|
||||
"protein": "4.400",
|
||||
"carbohydrates": "11.000",
|
||||
@@ -84,8 +84,8 @@
|
||||
"id": 58300,
|
||||
"code": "4071800000992",
|
||||
"name": "1688 Mehrkorn",
|
||||
"creation_date": "2020-12-20",
|
||||
"update_date": "2022-08-09",
|
||||
"created": "2020-12-20",
|
||||
"last_update": "2022-08-09",
|
||||
"energy": 229,
|
||||
"protein": "7.680",
|
||||
"carbohydrates": "35.700",
|
||||
@@ -137,8 +137,8 @@
|
||||
"id": 10065,
|
||||
"code": "0043647440020",
|
||||
"name": "'Old Times' Orange Fine Cut Marmalade",
|
||||
"creation_date": "2020-12-20",
|
||||
"update_date": "2022-08-09",
|
||||
"created": "2020-12-20",
|
||||
"last_update": "2022-08-09",
|
||||
"energy": 269,
|
||||
"protein": "0.000",
|
||||
"carbohydrates": "67.000",
|
||||
|
||||
@@ -181,7 +181,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -225,7 +226,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -248,7 +250,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> patch(
|
||||
@@ -263,7 +266,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<_i3.Response> deleteRequest(
|
||||
|
||||
@@ -181,7 +181,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -225,7 +226,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -248,7 +250,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> patch(
|
||||
@@ -263,7 +266,8 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<_i3.Response> deleteRequest(
|
||||
|
||||
@@ -23,7 +23,8 @@ import 'package:wger/providers/measurement.dart' as _i4;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -33,7 +34,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory {
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake
|
||||
implements _i3.MeasurementCategory {
|
||||
_FakeMeasurementCategory_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -46,7 +48,8 @@ class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.Measuremen
|
||||
/// 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);
|
||||
}
|
||||
@@ -119,7 +122,8 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod(
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addCategory,
|
||||
[category],
|
||||
|
||||
@@ -102,7 +102,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -146,7 +147,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -169,7 +171,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
@@ -184,7 +187,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
|
||||
@@ -25,7 +25,8 @@ import 'package:wger/providers/nutrition.dart' as _i7;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -35,7 +36,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_1 extends _i1.SmartFake implements _i3.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_1 extends _i1.SmartFake
|
||||
implements _i3.NutritionalPlan {
|
||||
_FakeNutritionalPlan_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -78,7 +80,8 @@ class _FakeIngredient_4 extends _i1.SmartFake implements _i6.Ingredient {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i7.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -155,12 +158,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -169,12 +174,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
)),
|
||||
) as _i8.Future<_i3.NutritionalPlan>);
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -183,12 +190,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
)),
|
||||
) as _i8.Future<_i3.NutritionalPlan>);
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -286,7 +295,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
)),
|
||||
) as _i8.Future<_i5.MealItem>);
|
||||
@override
|
||||
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) => (super.noSuchMethod(
|
||||
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -295,7 +305,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) => (super.noSuchMethod(
|
||||
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
@@ -335,7 +346,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
returnValue: _i8.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i8.Future<List<dynamic>>);
|
||||
@override
|
||||
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -386,7 +398,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -28,7 +28,7 @@ void main() {
|
||||
id: 1,
|
||||
code: '123456787',
|
||||
name: 'Water',
|
||||
creationDate: DateTime(2021, 5, 1),
|
||||
created: DateTime(2021, 5, 1),
|
||||
energy: 500,
|
||||
carbohydrates: 10,
|
||||
carbohydratesSugar: 2,
|
||||
|
||||
@@ -25,7 +25,8 @@ import 'package:wger/providers/nutrition.dart' as _i7;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -35,7 +36,8 @@ class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvi
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_1 extends _i1.SmartFake implements _i3.NutritionalPlan {
|
||||
class _FakeNutritionalPlan_1 extends _i1.SmartFake
|
||||
implements _i3.NutritionalPlan {
|
||||
_FakeNutritionalPlan_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -78,7 +80,8 @@ class _FakeIngredient_4 extends _i1.SmartFake implements _i6.Ingredient {
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansProvider {
|
||||
class MockNutritionPlansProvider extends _i1.Mock
|
||||
implements _i7.NutritionPlansProvider {
|
||||
MockNutritionPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -155,12 +158,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
@@ -169,12 +174,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
)),
|
||||
) as _i8.Future<_i3.NutritionalPlan>);
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
@@ -183,12 +190,14 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
)),
|
||||
) as _i8.Future<_i3.NutritionalPlan>);
|
||||
@override
|
||||
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) => (super.noSuchMethod(
|
||||
_i8.Future<_i3.NutritionalPlan> addPlan(_i3.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
returnValue: _i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
returnValue:
|
||||
_i8.Future<_i3.NutritionalPlan>.value(_FakeNutritionalPlan_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
@@ -286,7 +295,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
)),
|
||||
) as _i8.Future<_i5.MealItem>);
|
||||
@override
|
||||
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) => (super.noSuchMethod(
|
||||
_i8.Future<void> deleteMealItem(_i5.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
@@ -295,7 +305,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) => (super.noSuchMethod(
|
||||
_i8.Future<_i6.Ingredient> fetchIngredient(int? ingredientId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
@@ -335,7 +346,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
returnValue: _i8.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i8.Future<List<dynamic>>);
|
||||
@override
|
||||
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod(
|
||||
_i8.Future<_i6.Ingredient?> searchIngredientWithCode(String? code) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithCode,
|
||||
[code],
|
||||
@@ -386,7 +398,8 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i7.NutritionPlansP
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) => (super.noSuchMethod(
|
||||
_i8.Future<void> fetchAndSetLogs(_i3.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
|
||||
@@ -65,7 +65,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i3.StreamedResponse {
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake
|
||||
implements _i3.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -116,7 +117,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -160,7 +162,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -183,7 +186,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
@@ -198,7 +202,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
@@ -259,7 +264,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod(
|
||||
set applicationVersion(_i6.PackageInfo? _applicationVersion) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
_applicationVersion,
|
||||
@@ -378,7 +384,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
#serverUrl: serverUrl,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(
|
||||
<String, _i2.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i2.LoginActions>>);
|
||||
@override
|
||||
_i5.Future<Map<String, _i2.LoginActions>> login(
|
||||
@@ -395,7 +402,8 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
serverUrl,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(<String, _i2.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i2.LoginActions>>.value(
|
||||
<String, _i2.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i2.LoginActions>>);
|
||||
@override
|
||||
_i5.Future<String> getServerUrlFromPrefs() => (super.noSuchMethod(
|
||||
@@ -660,12 +668,14 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
returnValue: _i5.Future<_i9.Uint8List>.value(_i9.Uint8List(0)),
|
||||
) as _i5.Future<_i9.Uint8List>);
|
||||
@override
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => (super.noSuchMethod(
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue: _i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
returnValue:
|
||||
_i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -65,7 +65,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -108,7 +109,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod(
|
||||
set applicationVersion(_i4.PackageInfo? _applicationVersion) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
_applicationVersion,
|
||||
@@ -227,7 +229,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
#serverUrl: serverUrl,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(
|
||||
<String, _i3.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i3.LoginActions>>);
|
||||
@override
|
||||
_i5.Future<Map<String, _i3.LoginActions>> login(
|
||||
@@ -244,7 +247,8 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
serverUrl,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(<String, _i3.LoginActions>{}),
|
||||
returnValue: _i5.Future<Map<String, _i3.LoginActions>>.value(
|
||||
<String, _i3.LoginActions>{}),
|
||||
) as _i5.Future<Map<String, _i3.LoginActions>>);
|
||||
@override
|
||||
_i5.Future<String> getServerUrlFromPrefs() => (super.noSuchMethod(
|
||||
@@ -355,7 +359,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i7.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -399,7 +404,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i7.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -422,7 +428,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i7.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
@@ -437,7 +444,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i7.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i2.Response> deleteRequest(
|
||||
@@ -660,12 +668,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
returnValue: _i5.Future<_i9.Uint8List>.value(_i9.Uint8List(0)),
|
||||
) as _i5.Future<_i9.Uint8List>);
|
||||
@override
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue: _i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
returnValue:
|
||||
_i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -31,7 +31,8 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake
|
||||
implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -236,12 +237,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
returnValue: _i3.Future<_i5.Uint8List>.value(_i5.Uint8List(0)),
|
||||
) as _i3.Future<_i5.Uint8List>);
|
||||
@override
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod(
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
returnValue:
|
||||
_i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
|
||||
@@ -102,7 +102,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -146,7 +147,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -169,7 +171,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
@@ -184,7 +187,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
|
||||
@@ -102,7 +102,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -146,7 +147,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -169,7 +171,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
@@ -184,7 +187,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
|
||||
@@ -22,7 +22,8 @@ import 'package:wger/providers/body_weight.dart' as _i4;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -45,7 +46,8 @@ class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
|
||||
/// A class which mocks [BodyWeightProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider {
|
||||
class MockBodyWeightProvider extends _i1.Mock
|
||||
implements _i4.BodyWeightProvider {
|
||||
MockBodyWeightProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -99,7 +101,8 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider
|
||||
),
|
||||
) as _i3.WeightEntry);
|
||||
@override
|
||||
_i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method(
|
||||
_i3.WeightEntry? findByDate(DateTime? date) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#findByDate,
|
||||
[date],
|
||||
)) as _i3.WeightEntry?);
|
||||
@@ -109,10 +112,12 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider
|
||||
#fetchAndSetEntries,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
returnValue:
|
||||
_i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
) as _i5.Future<List<_i3.WeightEntry>>);
|
||||
@override
|
||||
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
|
||||
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
|
||||
@@ -68,7 +68,8 @@ class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_4 extends _i1.SmartFake
|
||||
implements _i4.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -88,7 +89,8 @@ class _FakeExerciseBase_5 extends _i1.SmartFake implements _i5.ExerciseBase {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_6 extends _i1.SmartFake implements _i6.ExerciseCategory {
|
||||
class _FakeExerciseCategory_6 extends _i1.SmartFake
|
||||
implements _i6.ExerciseCategory {
|
||||
_FakeExerciseCategory_6(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -169,7 +171,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -213,7 +216,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i10.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i10.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -236,7 +240,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i10.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i10.Future<Map<String, dynamic>> patch(
|
||||
@@ -251,7 +256,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i10.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i10.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i10.Future<_i3.Response> deleteRequest(
|
||||
@@ -296,7 +302,8 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
),
|
||||
) as _i4.WgerBaseProvider);
|
||||
@override
|
||||
set exerciseBases(List<_i5.ExerciseBase>? exercisesBases) => super.noSuchMethod(
|
||||
set exerciseBases(List<_i5.ExerciseBase>? exercisesBases) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#exerciseBases,
|
||||
exercisesBases,
|
||||
@@ -309,7 +316,8 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
returnValue: <_i5.ExerciseBase>[],
|
||||
) as List<_i5.ExerciseBase>);
|
||||
@override
|
||||
set filteredExerciseBases(List<_i5.ExerciseBase>? newFilteredExercises) => super.noSuchMethod(
|
||||
set filteredExerciseBases(List<_i5.ExerciseBase>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExerciseBases,
|
||||
newFilteredExercises,
|
||||
@@ -317,7 +325,8 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<int, List<_i5.ExerciseBase>> get exerciseBasesByVariation => (super.noSuchMethod(
|
||||
Map<int, List<_i5.ExerciseBase>> get exerciseBasesByVariation =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#exerciseBasesByVariation),
|
||||
returnValue: <int, List<_i5.ExerciseBase>>{},
|
||||
) as Map<int, List<_i5.ExerciseBase>>);
|
||||
@@ -514,7 +523,8 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
returnValueForMissingStub: _i10.Future<void>.value(),
|
||||
) as _i10.Future<void>);
|
||||
@override
|
||||
_i10.Future<_i5.ExerciseBase> fetchAndSetExerciseBase(int? exerciseBaseId) => (super.noSuchMethod(
|
||||
_i10.Future<_i5.ExerciseBase> fetchAndSetExerciseBase(int? exerciseBaseId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExerciseBase,
|
||||
[exerciseBaseId],
|
||||
@@ -528,7 +538,8 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
)),
|
||||
) as _i10.Future<_i5.ExerciseBase>);
|
||||
@override
|
||||
_i5.ExerciseBase readExerciseBaseFromBaseInfo(dynamic baseData) => (super.noSuchMethod(
|
||||
_i5.ExerciseBase readExerciseBaseFromBaseInfo(dynamic baseData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#readExerciseBaseFromBaseInfo,
|
||||
[baseData],
|
||||
@@ -574,7 +585,8 @@ class MockExercisesProvider extends _i1.Mock implements _i11.ExercisesProvider {
|
||||
#searchEnglish: searchEnglish,
|
||||
},
|
||||
),
|
||||
returnValue: _i10.Future<List<_i5.ExerciseBase>>.value(<_i5.ExerciseBase>[]),
|
||||
returnValue:
|
||||
_i10.Future<List<_i5.ExerciseBase>>.value(<_i5.ExerciseBase>[]),
|
||||
) as _i10.Future<List<_i5.ExerciseBase>>);
|
||||
@override
|
||||
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
||||
|
||||
@@ -31,7 +31,8 @@ import 'package:wger/providers/workout_plans.dart' as _i11;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -51,7 +52,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -101,7 +103,8 @@ class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake
|
||||
implements _i9.WorkoutSession {
|
||||
_FakeWorkoutSession_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -124,7 +127,8 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
/// A class which mocks [WorkoutPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProvider {
|
||||
class MockWorkoutPlansProvider extends _i1.Mock
|
||||
implements _i11.WorkoutPlansProvider {
|
||||
MockWorkoutPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -246,7 +250,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
@@ -260,7 +265,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWorkoutPlanFull,
|
||||
[workoutId],
|
||||
@@ -274,7 +280,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addWorkout,
|
||||
[workout],
|
||||
@@ -288,7 +295,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editWorkout,
|
||||
[workout],
|
||||
@@ -318,7 +326,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
@@ -428,7 +437,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValue: _i12.Future<List<_i7.Set>>.value(<_i7.Set>[]),
|
||||
) as _i12.Future<List<_i7.Set>>);
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
@@ -461,7 +471,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@override
|
||||
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod(
|
||||
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
@@ -483,12 +494,14 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
@override
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
returnValue:
|
||||
_i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
|
||||
@@ -22,7 +22,8 @@ import 'package:wger/providers/body_weight.dart' as _i4;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -45,7 +46,8 @@ class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
|
||||
/// A class which mocks [BodyWeightProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider {
|
||||
class MockBodyWeightProvider extends _i1.Mock
|
||||
implements _i4.BodyWeightProvider {
|
||||
MockBodyWeightProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -99,7 +101,8 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider
|
||||
),
|
||||
) as _i3.WeightEntry);
|
||||
@override
|
||||
_i3.WeightEntry? findByDate(DateTime? date) => (super.noSuchMethod(Invocation.method(
|
||||
_i3.WeightEntry? findByDate(DateTime? date) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#findByDate,
|
||||
[date],
|
||||
)) as _i3.WeightEntry?);
|
||||
@@ -109,10 +112,12 @@ class MockBodyWeightProvider extends _i1.Mock implements _i4.BodyWeightProvider
|
||||
#fetchAndSetEntries,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
returnValue:
|
||||
_i5.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
) as _i5.Future<List<_i3.WeightEntry>>);
|
||||
@override
|
||||
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod(
|
||||
_i5.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
|
||||
@@ -31,7 +31,8 @@ import 'package:wger/providers/workout_plans.dart' as _i11;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -51,7 +52,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -101,7 +103,8 @@ class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake
|
||||
implements _i9.WorkoutSession {
|
||||
_FakeWorkoutSession_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -124,7 +127,8 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
/// A class which mocks [WorkoutPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProvider {
|
||||
class MockWorkoutPlansProvider extends _i1.Mock
|
||||
implements _i11.WorkoutPlansProvider {
|
||||
MockWorkoutPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -246,7 +250,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
@@ -260,7 +265,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWorkoutPlanFull,
|
||||
[workoutId],
|
||||
@@ -274,7 +280,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addWorkout,
|
||||
[workout],
|
||||
@@ -288,7 +295,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editWorkout,
|
||||
[workout],
|
||||
@@ -318,7 +326,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
@@ -428,7 +437,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValue: _i12.Future<List<_i7.Set>>.value(<_i7.Set>[]),
|
||||
) as _i12.Future<List<_i7.Set>>);
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
@@ -461,7 +471,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@override
|
||||
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod(
|
||||
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
@@ -483,12 +494,14 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
@override
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
returnValue:
|
||||
_i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
|
||||
@@ -31,7 +31,8 @@ import 'package:wger/providers/workout_plans.dart' as _i11;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -51,7 +52,8 @@ class _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_2 extends _i1.SmartFake
|
||||
implements _i4.RepetitionUnit {
|
||||
_FakeRepetitionUnit_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -101,7 +103,8 @@ class _FakeSetting_6 extends _i1.SmartFake implements _i8.Setting {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake implements _i9.WorkoutSession {
|
||||
class _FakeWorkoutSession_7 extends _i1.SmartFake
|
||||
implements _i9.WorkoutSession {
|
||||
_FakeWorkoutSession_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -124,7 +127,8 @@ class _FakeLog_8 extends _i1.SmartFake implements _i10.Log {
|
||||
/// A class which mocks [WorkoutPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProvider {
|
||||
class MockWorkoutPlansProvider extends _i1.Mock
|
||||
implements _i11.WorkoutPlansProvider {
|
||||
MockWorkoutPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -246,7 +250,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
@@ -260,7 +265,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWorkoutPlanFull,
|
||||
[workoutId],
|
||||
@@ -274,7 +280,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
_i12.Future<_i5.WorkoutPlan> addWorkout(_i5.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addWorkout,
|
||||
[workout],
|
||||
@@ -288,7 +295,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
)),
|
||||
) as _i12.Future<_i5.WorkoutPlan>);
|
||||
@override
|
||||
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
_i12.Future<void> editWorkout(_i5.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editWorkout,
|
||||
[workout],
|
||||
@@ -318,7 +326,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i12.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i12.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
@@ -428,7 +437,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValue: _i12.Future<List<_i7.Set>>.value(<_i7.Set>[]),
|
||||
) as _i12.Future<List<_i7.Set>>);
|
||||
@override
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) => (super.noSuchMethod(
|
||||
_i12.Future<void> fetchComputedSettings(_i7.Set? workoutSet) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
@@ -461,7 +471,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
) as _i12.Future<void>);
|
||||
@override
|
||||
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) => (super.noSuchMethod(
|
||||
_i12.Future<_i8.Setting> addSetting(_i8.Setting? workoutSetting) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
@@ -483,12 +494,14 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i11.WorkoutPlansProv
|
||||
returnValue: _i12.Future<dynamic>.value(),
|
||||
) as _i12.Future<dynamic>);
|
||||
@override
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i12.Future<_i9.WorkoutSession> addSession(_i9.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
returnValue:
|
||||
_i12.Future<_i9.WorkoutSession>.value(_FakeWorkoutSession_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
|
||||
@@ -102,7 +102,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -146,7 +147,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -169,7 +171,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
@@ -184,7 +187,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
|
||||
@@ -102,7 +102,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -146,7 +147,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -169,7 +171,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
@@ -184,7 +187,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
|
||||
@@ -102,7 +102,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -146,7 +147,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -169,7 +171,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
@@ -184,7 +187,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
|
||||
@@ -38,7 +38,8 @@ import 'package:wger/providers/workout_plans.dart' as _i21;
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake
|
||||
implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -58,7 +59,8 @@ class _FakeExerciseBase_1 extends _i1.SmartFake implements _i3.ExerciseBase {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeExerciseCategory_2 extends _i1.SmartFake implements _i4.ExerciseCategory {
|
||||
class _FakeExerciseCategory_2 extends _i1.SmartFake
|
||||
implements _i4.ExerciseCategory {
|
||||
_FakeExerciseCategory_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -148,7 +150,8 @@ class _FakeWeightUnit_10 extends _i1.SmartFake implements _i10.WeightUnit {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeRepetitionUnit_11 extends _i1.SmartFake implements _i11.RepetitionUnit {
|
||||
class _FakeRepetitionUnit_11 extends _i1.SmartFake
|
||||
implements _i11.RepetitionUnit {
|
||||
_FakeRepetitionUnit_11(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -198,7 +201,8 @@ class _FakeSetting_15 extends _i1.SmartFake implements _i15.Setting {
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeWorkoutSession_16 extends _i1.SmartFake implements _i16.WorkoutSession {
|
||||
class _FakeWorkoutSession_16 extends _i1.SmartFake
|
||||
implements _i16.WorkoutSession {
|
||||
_FakeWorkoutSession_16(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
@@ -235,7 +239,8 @@ class MockExercisesProvider extends _i1.Mock implements _i18.ExercisesProvider {
|
||||
),
|
||||
) as _i2.WgerBaseProvider);
|
||||
@override
|
||||
set exerciseBases(List<_i3.ExerciseBase>? exercisesBases) => super.noSuchMethod(
|
||||
set exerciseBases(List<_i3.ExerciseBase>? exercisesBases) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#exerciseBases,
|
||||
exercisesBases,
|
||||
@@ -248,7 +253,8 @@ class MockExercisesProvider extends _i1.Mock implements _i18.ExercisesProvider {
|
||||
returnValue: <_i3.ExerciseBase>[],
|
||||
) as List<_i3.ExerciseBase>);
|
||||
@override
|
||||
set filteredExerciseBases(List<_i3.ExerciseBase>? newFilteredExercises) => super.noSuchMethod(
|
||||
set filteredExerciseBases(List<_i3.ExerciseBase>? newFilteredExercises) =>
|
||||
super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#filteredExerciseBases,
|
||||
newFilteredExercises,
|
||||
@@ -256,7 +262,8 @@ class MockExercisesProvider extends _i1.Mock implements _i18.ExercisesProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<int, List<_i3.ExerciseBase>> get exerciseBasesByVariation => (super.noSuchMethod(
|
||||
Map<int, List<_i3.ExerciseBase>> get exerciseBasesByVariation =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#exerciseBasesByVariation),
|
||||
returnValue: <int, List<_i3.ExerciseBase>>{},
|
||||
) as Map<int, List<_i3.ExerciseBase>>);
|
||||
@@ -453,7 +460,8 @@ class MockExercisesProvider extends _i1.Mock implements _i18.ExercisesProvider {
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
) as _i19.Future<void>);
|
||||
@override
|
||||
_i19.Future<_i3.ExerciseBase> fetchAndSetExerciseBase(int? exerciseBaseId) => (super.noSuchMethod(
|
||||
_i19.Future<_i3.ExerciseBase> fetchAndSetExerciseBase(int? exerciseBaseId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetExerciseBase,
|
||||
[exerciseBaseId],
|
||||
@@ -467,7 +475,8 @@ class MockExercisesProvider extends _i1.Mock implements _i18.ExercisesProvider {
|
||||
)),
|
||||
) as _i19.Future<_i3.ExerciseBase>);
|
||||
@override
|
||||
_i3.ExerciseBase readExerciseBaseFromBaseInfo(dynamic baseData) => (super.noSuchMethod(
|
||||
_i3.ExerciseBase readExerciseBaseFromBaseInfo(dynamic baseData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#readExerciseBaseFromBaseInfo,
|
||||
[baseData],
|
||||
@@ -513,7 +522,8 @@ class MockExercisesProvider extends _i1.Mock implements _i18.ExercisesProvider {
|
||||
#searchEnglish: searchEnglish,
|
||||
},
|
||||
),
|
||||
returnValue: _i19.Future<List<_i3.ExerciseBase>>.value(<_i3.ExerciseBase>[]),
|
||||
returnValue:
|
||||
_i19.Future<List<_i3.ExerciseBase>>.value(<_i3.ExerciseBase>[]),
|
||||
) as _i19.Future<List<_i3.ExerciseBase>>);
|
||||
@override
|
||||
void addListener(_i20.VoidCallback? listener) => super.noSuchMethod(
|
||||
@@ -590,7 +600,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) => (super.noSuchMethod(
|
||||
Map<String, String> getDefaultHeaders({dynamic includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
@@ -634,7 +645,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
returnValue: _i19.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i19.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i19.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i19.Future<List<dynamic>> fetchPaginated(Uri? uri) => (super.noSuchMethod(
|
||||
@@ -657,7 +669,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i19.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i19.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i19.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i19.Future<Map<String, dynamic>> patch(
|
||||
@@ -672,7 +685,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
uri,
|
||||
],
|
||||
),
|
||||
returnValue: _i19.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i19.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i19.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i19.Future<_i9.Response> deleteRequest(
|
||||
@@ -703,7 +717,8 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider {
|
||||
/// A class which mocks [WorkoutPlansProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProvider {
|
||||
class MockWorkoutPlansProvider extends _i1.Mock
|
||||
implements _i21.WorkoutPlansProvider {
|
||||
MockWorkoutPlansProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -825,7 +840,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProv
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
) as _i19.Future<void>);
|
||||
@override
|
||||
_i19.Future<_i12.WorkoutPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod(
|
||||
_i19.Future<_i12.WorkoutPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
@@ -839,7 +855,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProv
|
||||
)),
|
||||
) as _i19.Future<_i12.WorkoutPlan>);
|
||||
@override
|
||||
_i19.Future<_i12.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) => (super.noSuchMethod(
|
||||
_i19.Future<_i12.WorkoutPlan> fetchAndSetWorkoutPlanFull(int? workoutId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetWorkoutPlanFull,
|
||||
[workoutId],
|
||||
@@ -853,7 +870,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProv
|
||||
)),
|
||||
) as _i19.Future<_i12.WorkoutPlan>);
|
||||
@override
|
||||
_i19.Future<_i12.WorkoutPlan> addWorkout(_i12.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
_i19.Future<_i12.WorkoutPlan> addWorkout(_i12.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addWorkout,
|
||||
[workout],
|
||||
@@ -867,7 +885,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProv
|
||||
)),
|
||||
) as _i19.Future<_i12.WorkoutPlan>);
|
||||
@override
|
||||
_i19.Future<void> editWorkout(_i12.WorkoutPlan? workout) => (super.noSuchMethod(
|
||||
_i19.Future<void> editWorkout(_i12.WorkoutPlan? workout) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editWorkout,
|
||||
[workout],
|
||||
@@ -897,7 +916,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProv
|
||||
base,
|
||||
],
|
||||
),
|
||||
returnValue: _i19.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue:
|
||||
_i19.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i19.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i19.Future<void> fetchAndSetRepetitionUnits() => (super.noSuchMethod(
|
||||
@@ -1007,7 +1027,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProv
|
||||
returnValue: _i19.Future<List<_i14.Set>>.value(<_i14.Set>[]),
|
||||
) as _i19.Future<List<_i14.Set>>);
|
||||
@override
|
||||
_i19.Future<void> fetchComputedSettings(_i14.Set? workoutSet) => (super.noSuchMethod(
|
||||
_i19.Future<void> fetchComputedSettings(_i14.Set? workoutSet) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchComputedSettings,
|
||||
[workoutSet],
|
||||
@@ -1040,7 +1061,8 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProv
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
) as _i19.Future<void>);
|
||||
@override
|
||||
_i19.Future<_i15.Setting> addSetting(_i15.Setting? workoutSetting) => (super.noSuchMethod(
|
||||
_i19.Future<_i15.Setting> addSetting(_i15.Setting? workoutSetting) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSetting,
|
||||
[workoutSetting],
|
||||
@@ -1062,12 +1084,14 @@ class MockWorkoutPlansProvider extends _i1.Mock implements _i21.WorkoutPlansProv
|
||||
returnValue: _i19.Future<dynamic>.value(),
|
||||
) as _i19.Future<dynamic>);
|
||||
@override
|
||||
_i19.Future<_i16.WorkoutSession> addSession(_i16.WorkoutSession? session) => (super.noSuchMethod(
|
||||
_i19.Future<_i16.WorkoutSession> addSession(_i16.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
[session],
|
||||
),
|
||||
returnValue: _i19.Future<_i16.WorkoutSession>.value(_FakeWorkoutSession_16(
|
||||
returnValue:
|
||||
_i19.Future<_i16.WorkoutSession>.value(_FakeWorkoutSession_16(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addSession,
|
||||
|
||||
@@ -48,8 +48,8 @@ const testEquipment = [tEquipment1, tEquipment2, tEquipment3];
|
||||
final benchPress = ExerciseBase(
|
||||
id: 1,
|
||||
uuid: '364f196c-881b-4839-8bfc-9e8f651521b6',
|
||||
creationDate: DateTime(2021, 09, 01),
|
||||
updateDate: DateTime(2021, 09, 10),
|
||||
created: DateTime(2021, 09, 01),
|
||||
lastUpdate: DateTime(2021, 09, 10),
|
||||
category: tCategory1,
|
||||
equipment: const [tEquipment1, tEquipment2],
|
||||
muscles: const [tMuscle1, tMuscle2],
|
||||
@@ -59,8 +59,8 @@ final benchPress = ExerciseBase(
|
||||
final crunches = ExerciseBase(
|
||||
id: 2,
|
||||
uuid: '82415754-fc4c-49ea-8ca7-1516dd36d5a0',
|
||||
creationDate: DateTime(2021, 08, 01),
|
||||
updateDate: DateTime(2021, 08, 10),
|
||||
created: DateTime(2021, 08, 01),
|
||||
lastUpdate: DateTime(2021, 08, 10),
|
||||
category: tCategory2,
|
||||
equipment: const [tEquipment2],
|
||||
muscles: const [tMuscle1],
|
||||
@@ -70,8 +70,8 @@ final crunches = ExerciseBase(
|
||||
final deadLift = ExerciseBase(
|
||||
id: 3,
|
||||
uuid: 'ca84e2c5-5608-4d6d-ba57-6d4b6b5e7acd',
|
||||
creationDate: DateTime(2021, 08, 01),
|
||||
updateDate: DateTime(2021, 08, 01),
|
||||
created: DateTime(2021, 08, 01),
|
||||
lastUpdate: DateTime(2021, 08, 01),
|
||||
category: tCategory3,
|
||||
equipment: const [tEquipment2],
|
||||
muscles: const [tMuscle1],
|
||||
@@ -81,8 +81,8 @@ final deadLift = ExerciseBase(
|
||||
final curls = ExerciseBase(
|
||||
id: 4,
|
||||
uuid: '361f024c-fdf8-4146-b7d7-0c1b67c58141',
|
||||
creationDate: DateTime(2021, 08, 01),
|
||||
updateDate: DateTime(2021, 08, 01),
|
||||
created: DateTime(2021, 08, 01),
|
||||
lastUpdate: DateTime(2021, 08, 01),
|
||||
category: tCategory3,
|
||||
equipment: const [tEquipment2],
|
||||
muscles: const [tMuscle1],
|
||||
@@ -91,8 +91,8 @@ final curls = ExerciseBase(
|
||||
final squats = ExerciseBase(
|
||||
id: 5,
|
||||
uuid: '361f024c-fdf8-4146-b7d7-0c1b67c58141',
|
||||
creationDate: DateTime(2021, 08, 01),
|
||||
updateDate: DateTime(2021, 08, 01),
|
||||
created: DateTime(2021, 08, 01),
|
||||
lastUpdate: DateTime(2021, 08, 01),
|
||||
category: tCategory3,
|
||||
equipment: const [tEquipment2],
|
||||
muscles: const [tMuscle1],
|
||||
@@ -101,8 +101,8 @@ final squats = ExerciseBase(
|
||||
final sideRaises = ExerciseBase(
|
||||
id: 6,
|
||||
uuid: '721ff972-c568-41e3-8cf5-cf1e5c5c801c',
|
||||
creationDate: DateTime(2022, 11, 01),
|
||||
updateDate: DateTime(2022, 11, 01),
|
||||
created: DateTime(2022, 11, 01),
|
||||
lastUpdate: DateTime(2022, 11, 01),
|
||||
category: tCategory4,
|
||||
equipment: const [tEquipment2],
|
||||
muscles: const [tMuscle1],
|
||||
@@ -112,7 +112,7 @@ final sideRaises = ExerciseBase(
|
||||
final benchPressDe = Translation(
|
||||
id: 1,
|
||||
uuid: 'f4cc326b-e497-4bd7-a71d-0eb1db522743',
|
||||
creationDate: DateTime(2021, 1, 15),
|
||||
created: DateTime(2021, 1, 15),
|
||||
name: 'Bankdrücken',
|
||||
description: 'add clever text',
|
||||
baseId: benchPress.id,
|
||||
@@ -121,7 +121,7 @@ final benchPressDe = Translation(
|
||||
final benchPressEn = Translation(
|
||||
id: 7,
|
||||
uuid: 'f4cc326b-e497-4bd7-a71d-0eb1db522743',
|
||||
creationDate: DateTime(2021, 1, 15),
|
||||
created: DateTime(2021, 1, 15),
|
||||
name: 'Bench press',
|
||||
description: 'add clever text',
|
||||
baseId: benchPress.id,
|
||||
@@ -131,7 +131,7 @@ final benchPressEn = Translation(
|
||||
final deadLiftEn = Translation(
|
||||
id: 2,
|
||||
uuid: 'b7f51a1a-0368-4dfc-a03c-d629a4089b4a',
|
||||
creationDate: DateTime(2021, 1, 15),
|
||||
created: DateTime(2021, 1, 15),
|
||||
name: 'Dead Lift',
|
||||
description: 'Lorem ipsum etc',
|
||||
baseId: crunches.id,
|
||||
@@ -141,7 +141,7 @@ final deadLiftEn = Translation(
|
||||
final crunchesFr = Translation(
|
||||
id: 3,
|
||||
uuid: 'd83f572d-add5-48dc-89cf-75f6770284f1',
|
||||
creationDate: DateTime(2021, 4, 1),
|
||||
created: DateTime(2021, 4, 1),
|
||||
name: 'Crunches',
|
||||
description: 'The man in black fled across the desert, and the gunslinger followed',
|
||||
baseId: deadLift.id,
|
||||
@@ -151,7 +151,7 @@ final crunchesFr = Translation(
|
||||
final crunchesDe = Translation(
|
||||
id: 4,
|
||||
uuid: 'a3e96c1d-b35f-4b0e-9cf4-ca37666cf521',
|
||||
creationDate: DateTime(2021, 4, 1),
|
||||
created: DateTime(2021, 4, 1),
|
||||
name: 'Crunches',
|
||||
description: 'The story so far: in the beginning, the universe was created',
|
||||
baseId: deadLift.id,
|
||||
@@ -161,7 +161,7 @@ final crunchesDe = Translation(
|
||||
final crunchesEn = Translation(
|
||||
id: 5,
|
||||
uuid: '8c49a816-2247-4116-94bb-b5c0ce09c609',
|
||||
creationDate: DateTime(2021, 4, 1),
|
||||
created: DateTime(2021, 4, 1),
|
||||
name: 'test exercise 5',
|
||||
description: 'I am an invisible man',
|
||||
baseId: deadLift.id,
|
||||
@@ -171,7 +171,7 @@ final crunchesEn = Translation(
|
||||
final curlsEn = Translation(
|
||||
id: 6,
|
||||
uuid: '259a637e-957f-4fe1-b61b-f56e3793ebcd',
|
||||
creationDate: DateTime(2021, 4, 1),
|
||||
created: DateTime(2021, 4, 1),
|
||||
name: 'Curls',
|
||||
description: 'It was a bright cold day in April, and the clocks were striking thirteen',
|
||||
baseId: curls.id,
|
||||
@@ -181,7 +181,7 @@ final curlsEn = Translation(
|
||||
final squatsEn = Translation(
|
||||
id: 8,
|
||||
uuid: '259a637e-957f-4fe1-b61b-f56e3793ebcd',
|
||||
creationDate: DateTime(2021, 4, 1),
|
||||
created: DateTime(2021, 4, 1),
|
||||
name: 'Squats',
|
||||
description: 'It was a bright cold day in April, and the clocks were striking thirteen',
|
||||
baseId: curls.id,
|
||||
@@ -191,7 +191,7 @@ final squatsEn = Translation(
|
||||
final sideRaisesEn = Translation(
|
||||
id: 9,
|
||||
uuid: '6bf89ad0-5a43-4e98-91d3-a8c6886c9712',
|
||||
creationDate: DateTime(2022, 11, 1),
|
||||
created: DateTime(2022, 11, 1),
|
||||
name: 'Side raises',
|
||||
description: 'It was a bright cold day in April, and the clocks were striking thirteen',
|
||||
baseId: curls.id,
|
||||
|
||||
@@ -27,7 +27,7 @@ final ingredient1 = Ingredient(
|
||||
id: 1,
|
||||
code: '123456787',
|
||||
name: 'Water',
|
||||
creationDate: DateTime(2021, 5, 1),
|
||||
created: DateTime(2021, 5, 1),
|
||||
energy: 500,
|
||||
carbohydrates: 10,
|
||||
carbohydratesSugar: 2,
|
||||
@@ -41,7 +41,7 @@ final ingredient2 = Ingredient(
|
||||
id: 2,
|
||||
code: '123456788',
|
||||
name: 'Burger soup',
|
||||
creationDate: DateTime(2021, 5, 10),
|
||||
created: DateTime(2021, 5, 10),
|
||||
energy: 25,
|
||||
carbohydrates: 10,
|
||||
carbohydratesSugar: 2,
|
||||
@@ -55,7 +55,7 @@ final ingredient3 = Ingredient(
|
||||
id: 3,
|
||||
code: '123456789',
|
||||
name: 'Broccoli cake',
|
||||
creationDate: DateTime(2021, 5, 2),
|
||||
created: DateTime(2021, 5, 2),
|
||||
energy: 1200,
|
||||
carbohydrates: 110,
|
||||
carbohydratesSugar: 2,
|
||||
|
||||
Reference in New Issue
Block a user