mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Merge pull request #950 from wger-project/feature/day-type
Set day and set types
This commit is contained in:
2
.github/actions/flutter-common/action.yml
vendored
2
.github/actions/flutter-common/action.yml
vendored
@@ -9,7 +9,7 @@ runs:
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
flutter-version: 3.35.2
|
||||
flutter-version: 3.35.5
|
||||
cache: true
|
||||
|
||||
- name: Install Flutter dependencies
|
||||
|
||||
@@ -156,6 +156,25 @@
|
||||
"description": "Category for an exercise, ingredient, etc."
|
||||
},
|
||||
"startDate": "Start date",
|
||||
"@startDate": {
|
||||
"description": "The start date of a nutritional plan or routine"
|
||||
},
|
||||
"dayTypeCustom": "Custom",
|
||||
"dayTypeEnom": "Every minute on the minute",
|
||||
"dayTypeAmrap": "As many rounds as possible",
|
||||
"dayTypeHiit": "High intensity interval training",
|
||||
"dayTypeTabata": "Tabata",
|
||||
"dayTypeEdt": "Escalating density training",
|
||||
"dayTypeRft": "Rounds for time",
|
||||
"dayTypeAfap": "As fast as possible",
|
||||
"slotEntryTypeNormal": "Normal",
|
||||
"slotEntryTypeDropset": "Dropset",
|
||||
"slotEntryTypeMyo": "Myo",
|
||||
"slotEntryTypePartial": "Partial",
|
||||
"slotEntryTypeForced": "Forced",
|
||||
"slotEntryTypeTut": "Time under Tension",
|
||||
"slotEntryTypeIso": "Isometric hold",
|
||||
"slotEntryTypeJump": "Jump",
|
||||
"routines": "Routines",
|
||||
"newRoutine": "New routine",
|
||||
"noRoutines": "You have no routines",
|
||||
@@ -386,13 +405,9 @@
|
||||
"@date": {
|
||||
"description": "The date of a workout log or body weight entry"
|
||||
},
|
||||
"creationDate": "Start date",
|
||||
"@creationDate": {
|
||||
"description": "The Start date of a nutritional plan"
|
||||
},
|
||||
"endDate": "End date",
|
||||
"@endDate": {
|
||||
"description": "The End date of a nutritional plan"
|
||||
"description": "The End date of a nutritional plan or routine"
|
||||
},
|
||||
"openEnded": "Open ended",
|
||||
"@openEnded": {
|
||||
|
||||
@@ -17,10 +17,36 @@
|
||||
*/
|
||||
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:wger/l10n/generated/app_localizations.dart';
|
||||
import 'package:wger/models/workouts/slot.dart';
|
||||
|
||||
part 'day.g.dart';
|
||||
|
||||
enum DayType { custom, enom, amrap, hiit, tabata, edt, rft, afap }
|
||||
|
||||
extension DayTypeExtension on DayType {
|
||||
String i18Label(AppLocalizations i18n) {
|
||||
switch (this) {
|
||||
case DayType.custom:
|
||||
return i18n.dayTypeCustom;
|
||||
case DayType.enom:
|
||||
return i18n.dayTypeEnom;
|
||||
case DayType.amrap:
|
||||
return i18n.dayTypeAmrap;
|
||||
case DayType.hiit:
|
||||
return i18n.dayTypeHiit;
|
||||
case DayType.tabata:
|
||||
return i18n.dayTypeTabata;
|
||||
case DayType.edt:
|
||||
return i18n.dayTypeEdt;
|
||||
case DayType.rft:
|
||||
return i18n.dayTypeRft;
|
||||
case DayType.afap:
|
||||
return i18n.dayTypeAfap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Day {
|
||||
static const MIN_LENGTH_NAME = 3;
|
||||
@@ -39,48 +65,67 @@ class Day {
|
||||
@JsonKey(required: true)
|
||||
late String description;
|
||||
|
||||
@JsonKey(required: true)
|
||||
late DayType type;
|
||||
|
||||
@JsonKey(required: true, name: 'is_rest')
|
||||
late bool isRest;
|
||||
|
||||
@JsonKey(required: true, name: 'need_logs_to_advance')
|
||||
late bool needLogsToAdvance;
|
||||
|
||||
@JsonKey(required: true)
|
||||
late String type;
|
||||
|
||||
@JsonKey(required: true)
|
||||
late num order;
|
||||
|
||||
@JsonKey(required: true)
|
||||
late Object? config;
|
||||
|
||||
@JsonKey(required: false, defaultValue: [], includeFromJson: true, includeToJson: false)
|
||||
@JsonKey(required: false, includeFromJson: true, includeToJson: false)
|
||||
List<Slot> slots = [];
|
||||
|
||||
Day({
|
||||
this.id,
|
||||
required this.routineId,
|
||||
required this.name,
|
||||
required this.description,
|
||||
this.description = '',
|
||||
this.isRest = false,
|
||||
this.needLogsToAdvance = false,
|
||||
this.type = 'custom',
|
||||
this.order = 0,
|
||||
this.config = null,
|
||||
this.type = DayType.custom,
|
||||
this.order = 1,
|
||||
this.config,
|
||||
this.slots = const [],
|
||||
});
|
||||
|
||||
Day.empty() {
|
||||
name = 'new day';
|
||||
description = '';
|
||||
type = 'custom';
|
||||
isRest = false;
|
||||
needLogsToAdvance = false;
|
||||
order = 0;
|
||||
config = {};
|
||||
slots = [];
|
||||
Day copyWith({
|
||||
int? id,
|
||||
int? routineId,
|
||||
String? name,
|
||||
String? description,
|
||||
DayType? type,
|
||||
bool? isRest,
|
||||
bool? needLogsToAdvance,
|
||||
num? order,
|
||||
Object? config,
|
||||
List<Slot>? slots,
|
||||
}) {
|
||||
return Day(
|
||||
id: id ?? this.id,
|
||||
routineId: routineId ?? this.routineId,
|
||||
name: name ?? this.name,
|
||||
description: description ?? this.description,
|
||||
type: type ?? this.type,
|
||||
isRest: isRest ?? this.isRest,
|
||||
needLogsToAdvance: needLogsToAdvance ?? this.needLogsToAdvance,
|
||||
order: order ?? this.order,
|
||||
config: config ?? this.config,
|
||||
slots: slots ?? this.slots,
|
||||
);
|
||||
}
|
||||
|
||||
bool get isSpecialType => type != DayType.custom;
|
||||
|
||||
String get nameWithType => isSpecialType ? '${type.name.toUpperCase()} - $name' : name;
|
||||
|
||||
// Boilerplate
|
||||
factory Day.fromJson(Map<String, dynamic> json) => _$DayFromJson(json);
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ Day _$DayFromJson(Map<String, dynamic> json) {
|
||||
'routine',
|
||||
'name',
|
||||
'description',
|
||||
'type',
|
||||
'is_rest',
|
||||
'need_logs_to_advance',
|
||||
'type',
|
||||
'order',
|
||||
'config',
|
||||
],
|
||||
@@ -25,17 +25,17 @@ Day _$DayFromJson(Map<String, dynamic> json) {
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
routineId: (json['routine'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
description: json['description'] as String? ?? '',
|
||||
isRest: json['is_rest'] as bool? ?? false,
|
||||
needLogsToAdvance: json['need_logs_to_advance'] as bool? ?? false,
|
||||
type: json['type'] as String? ?? 'custom',
|
||||
order: json['order'] as num? ?? 0,
|
||||
config: json['config'] ?? null,
|
||||
type: $enumDecodeNullable(_$DayTypeEnumMap, json['type']) ?? DayType.custom,
|
||||
order: json['order'] as num? ?? 1,
|
||||
config: json['config'],
|
||||
slots:
|
||||
(json['slots'] as List<dynamic>?)
|
||||
?.map((e) => Slot.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
const [],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -43,9 +43,20 @@ Map<String, dynamic> _$DayToJson(Day instance) => <String, dynamic>{
|
||||
'routine': instance.routineId,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'type': _$DayTypeEnumMap[instance.type]!,
|
||||
'is_rest': instance.isRest,
|
||||
'need_logs_to_advance': instance.needLogsToAdvance,
|
||||
'type': instance.type,
|
||||
'order': instance.order,
|
||||
'config': instance.config,
|
||||
};
|
||||
|
||||
const _$DayTypeEnumMap = {
|
||||
DayType.custom: 'custom',
|
||||
DayType.enom: 'enom',
|
||||
DayType.amrap: 'amrap',
|
||||
DayType.hiit: 'hiit',
|
||||
DayType.tabata: 'tabata',
|
||||
DayType.edt: 'edt',
|
||||
DayType.rft: 'rft',
|
||||
DayType.afap: 'afap',
|
||||
};
|
||||
|
||||
@@ -21,6 +21,7 @@ import 'package:wger/helpers/consts.dart';
|
||||
import 'package:wger/helpers/json.dart';
|
||||
import 'package:wger/models/exercises/exercise.dart';
|
||||
import 'package:wger/models/workouts/repetition_unit.dart';
|
||||
import 'package:wger/models/workouts/slot_entry.dart';
|
||||
import 'package:wger/models/workouts/weight_unit.dart';
|
||||
|
||||
part 'set_config_data.g.dart';
|
||||
@@ -37,11 +38,13 @@ class SetConfigData {
|
||||
late int slotEntryId;
|
||||
|
||||
@JsonKey(required: true)
|
||||
late String type;
|
||||
late SlotEntryType type;
|
||||
|
||||
@JsonKey(required: true, name: 'text_repr')
|
||||
late String textRepr;
|
||||
|
||||
String get textReprWithType => '$textRepr${type.typeLabel}';
|
||||
|
||||
@JsonKey(required: true, name: 'sets')
|
||||
late num? nrOfSets;
|
||||
|
||||
@@ -99,17 +102,17 @@ class SetConfigData {
|
||||
SetConfigData({
|
||||
required this.exerciseId,
|
||||
required this.slotEntryId,
|
||||
this.type = 'normal',
|
||||
this.type = SlotEntryType.normal,
|
||||
required this.nrOfSets,
|
||||
this.maxNrOfSets,
|
||||
required this.weight,
|
||||
this.maxWeight,
|
||||
this.weightUnitId = WEIGHT_UNIT_KG,
|
||||
this.weightRounding = null,
|
||||
this.weightRounding,
|
||||
required this.repetitions,
|
||||
this.maxRepetitions,
|
||||
this.repetitionsUnitId = REP_UNIT_REPETITIONS_ID,
|
||||
this.repetitionsRounding = null,
|
||||
this.repetitionsRounding,
|
||||
required this.rir,
|
||||
this.maxRir,
|
||||
required this.rpe,
|
||||
|
||||
@@ -35,21 +35,19 @@ SetConfigData _$SetConfigDataFromJson(Map<String, dynamic> json) {
|
||||
return SetConfigData(
|
||||
exerciseId: (json['exercise'] as num).toInt(),
|
||||
slotEntryId: (json['slot_entry_id'] as num).toInt(),
|
||||
type: json['type'] as String? ?? 'normal',
|
||||
type: $enumDecodeNullable(_$SlotEntryTypeEnumMap, json['type']) ?? SlotEntryType.normal,
|
||||
nrOfSets: json['sets'] as num?,
|
||||
maxNrOfSets: json['max_sets'] as num?,
|
||||
weight: stringToNumNull(json['weight'] as String?),
|
||||
maxWeight: stringToNumNull(json['max_weight'] as String?),
|
||||
weightUnitId: (json['weight_unit'] as num?)?.toInt() ?? WEIGHT_UNIT_KG,
|
||||
weightRounding: json['weight_rounding'] == null
|
||||
? null
|
||||
: stringToNumNull(json['weight_rounding'] as String?),
|
||||
weightRounding: stringToNumNull(json['weight_rounding'] as String?),
|
||||
repetitions: stringToNumNull(json['repetitions'] as String?),
|
||||
maxRepetitions: stringToNumNull(json['max_repetitions'] as String?),
|
||||
repetitionsUnitId: (json['repetitions_unit'] as num?)?.toInt() ?? REP_UNIT_REPETITIONS_ID,
|
||||
repetitionsRounding: json['repetitions_rounding'] == null
|
||||
? null
|
||||
: stringToNumNull(json['repetitions_rounding'] as String?),
|
||||
repetitionsRounding: stringToNumNull(
|
||||
json['repetitions_rounding'] as String?,
|
||||
),
|
||||
rir: stringToNumNull(json['rir'] as String?),
|
||||
maxRir: stringToNumNull(json['max_rir'] as String?),
|
||||
rpe: stringToNumNull(json['rpe'] as String?),
|
||||
@@ -63,7 +61,7 @@ SetConfigData _$SetConfigDataFromJson(Map<String, dynamic> json) {
|
||||
Map<String, dynamic> _$SetConfigDataToJson(SetConfigData instance) => <String, dynamic>{
|
||||
'exercise': instance.exerciseId,
|
||||
'slot_entry_id': instance.slotEntryId,
|
||||
'type': instance.type,
|
||||
'type': _$SlotEntryTypeEnumMap[instance.type]!,
|
||||
'text_repr': instance.textRepr,
|
||||
'sets': instance.nrOfSets,
|
||||
'max_sets': instance.maxNrOfSets,
|
||||
@@ -82,3 +80,14 @@ Map<String, dynamic> _$SetConfigDataToJson(SetConfigData instance) => <String, d
|
||||
'max_rest': instance.maxRestTime,
|
||||
'comment': instance.comment,
|
||||
};
|
||||
|
||||
const _$SlotEntryTypeEnumMap = {
|
||||
SlotEntryType.normal: 'normal',
|
||||
SlotEntryType.dropset: 'dropset',
|
||||
SlotEntryType.myo: 'myo',
|
||||
SlotEntryType.partial: 'partial',
|
||||
SlotEntryType.forced: 'forced',
|
||||
SlotEntryType.tut: 'tut',
|
||||
SlotEntryType.iso: 'iso',
|
||||
SlotEntryType.jump: 'jump',
|
||||
};
|
||||
|
||||
@@ -7,7 +7,10 @@ part of 'slot_data.dart';
|
||||
// **************************************************************************
|
||||
|
||||
SlotData _$SlotDataFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(json, requiredKeys: const ['comment', 'is_superset', 'exercises', 'sets']);
|
||||
$checkKeys(
|
||||
json,
|
||||
requiredKeys: const ['comment', 'is_superset', 'exercises', 'sets'],
|
||||
);
|
||||
return SlotData(
|
||||
comment: json['comment'] as String,
|
||||
isSuperset: json['is_superset'] as bool,
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:wger/helpers/consts.dart';
|
||||
import 'package:wger/helpers/json.dart';
|
||||
import 'package:wger/l10n/generated/app_localizations.dart';
|
||||
import 'package:wger/models/exercises/exercise.dart';
|
||||
import 'package:wger/models/workouts/base_config.dart';
|
||||
import 'package:wger/models/workouts/repetition_unit.dart';
|
||||
@@ -26,6 +27,33 @@ import 'package:wger/models/workouts/weight_unit.dart';
|
||||
|
||||
part 'slot_entry.g.dart';
|
||||
|
||||
enum SlotEntryType { normal, dropset, myo, partial, forced, tut, iso, jump }
|
||||
|
||||
extension SlotEntryTypeExtension on SlotEntryType {
|
||||
String i18Label(AppLocalizations i18n) {
|
||||
switch (this) {
|
||||
case SlotEntryType.normal:
|
||||
return i18n.slotEntryTypeNormal;
|
||||
case SlotEntryType.dropset:
|
||||
return i18n.slotEntryTypeDropset;
|
||||
case SlotEntryType.myo:
|
||||
return i18n.slotEntryTypeMyo;
|
||||
case SlotEntryType.partial:
|
||||
return i18n.slotEntryTypePartial;
|
||||
case SlotEntryType.forced:
|
||||
return i18n.slotEntryTypeForced;
|
||||
case SlotEntryType.tut:
|
||||
return i18n.slotEntryTypeTut;
|
||||
case SlotEntryType.iso:
|
||||
return i18n.slotEntryTypeIso;
|
||||
case SlotEntryType.jump:
|
||||
return i18n.slotEntryTypeJump;
|
||||
}
|
||||
}
|
||||
|
||||
String get typeLabel => this != SlotEntryType.normal ? ' (${name.toUpperCase()})' : '';
|
||||
}
|
||||
|
||||
enum ConfigType {
|
||||
weight,
|
||||
maxWeight,
|
||||
@@ -59,7 +87,7 @@ class SlotEntry {
|
||||
late String comment;
|
||||
|
||||
@JsonKey(required: true)
|
||||
late String type;
|
||||
late SlotEntryType type;
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
late Exercise exerciseObj;
|
||||
@@ -121,14 +149,14 @@ class SlotEntry {
|
||||
SlotEntry({
|
||||
this.id,
|
||||
required this.slotId,
|
||||
required this.order,
|
||||
required this.type,
|
||||
this.order = 1,
|
||||
this.type = SlotEntryType.normal,
|
||||
required this.exerciseId,
|
||||
required this.repetitionUnitId,
|
||||
required this.repetitionRounding,
|
||||
required this.weightUnitId,
|
||||
required this.weightRounding,
|
||||
required this.comment,
|
||||
this.comment = '',
|
||||
this.weightConfigs = const [],
|
||||
this.maxWeightConfigs = const [],
|
||||
this.nrOfSetsConfigs = const [],
|
||||
@@ -160,27 +188,25 @@ class SlotEntry {
|
||||
required this.slotId,
|
||||
String? comment,
|
||||
int? order,
|
||||
String? type,
|
||||
SlotEntryType? type,
|
||||
required Exercise exercise,
|
||||
int? weightUnitId,
|
||||
num? weightRounding,
|
||||
this.weightRounding,
|
||||
int? repetitionUnitId,
|
||||
num? repetitionRounding,
|
||||
this.repetitionRounding,
|
||||
}) {
|
||||
this.order = order ?? 1;
|
||||
this.comment = comment ?? '';
|
||||
config = null;
|
||||
this.type = type ?? 'normal';
|
||||
this.type = type ?? SlotEntryType.normal;
|
||||
exerciseObj = exercise;
|
||||
exerciseId = exercise.id!;
|
||||
this.weightUnitId = weightUnitId ?? WEIGHT_UNIT_KG;
|
||||
this.weightRounding = weightRounding;
|
||||
|
||||
this.repetitionUnitId = repetitionUnitId ?? REP_UNIT_REPETITIONS_ID;
|
||||
this.repetitionRounding = repetitionRounding;
|
||||
}
|
||||
|
||||
get rir {
|
||||
String get rir {
|
||||
return 'DELETE ME! RIR';
|
||||
}
|
||||
|
||||
|
||||
@@ -26,14 +26,14 @@ SlotEntry _$SlotEntryFromJson(Map<String, dynamic> json) {
|
||||
return SlotEntry(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
slotId: (json['slot'] as num).toInt(),
|
||||
order: (json['order'] as num).toInt(),
|
||||
type: json['type'] as String,
|
||||
order: (json['order'] as num?)?.toInt() ?? 1,
|
||||
type: $enumDecodeNullable(_$SlotEntryTypeEnumMap, json['type']) ?? SlotEntryType.normal,
|
||||
exerciseId: (json['exercise'] as num).toInt(),
|
||||
repetitionUnitId: (json['repetition_unit'] as num?)?.toInt(),
|
||||
repetitionRounding: stringToNumNull(json['repetition_rounding'] as String?),
|
||||
weightUnitId: (json['weight_unit'] as num?)?.toInt(),
|
||||
weightRounding: stringToNumNull(json['weight_rounding'] as String?),
|
||||
comment: json['comment'] as String,
|
||||
comment: json['comment'] as String? ?? '',
|
||||
weightConfigs:
|
||||
(json['weight_configs'] as List<dynamic>?)
|
||||
?.map((e) => BaseConfig.fromJson(e as Map<String, dynamic>))
|
||||
@@ -91,7 +91,7 @@ Map<String, dynamic> _$SlotEntryToJson(SlotEntry instance) => <String, dynamic>{
|
||||
'slot': instance.slotId,
|
||||
'order': instance.order,
|
||||
'comment': instance.comment,
|
||||
'type': instance.type,
|
||||
'type': _$SlotEntryTypeEnumMap[instance.type]!,
|
||||
'exercise': instance.exerciseId,
|
||||
'repetition_unit': instance.repetitionUnitId,
|
||||
'repetition_rounding': instance.repetitionRounding,
|
||||
@@ -99,3 +99,14 @@ Map<String, dynamic> _$SlotEntryToJson(SlotEntry instance) => <String, dynamic>{
|
||||
'weight_rounding': instance.weightRounding,
|
||||
'config': instance.config,
|
||||
};
|
||||
|
||||
const _$SlotEntryTypeEnumMap = {
|
||||
SlotEntryType.normal: 'normal',
|
||||
SlotEntryType.dropset: 'dropset',
|
||||
SlotEntryType.myo: 'myo',
|
||||
SlotEntryType.partial: 'partial',
|
||||
SlotEntryType.forced: 'forced',
|
||||
SlotEntryType.tut: 'tut',
|
||||
SlotEntryType.iso: 'iso',
|
||||
SlotEntryType.jump: 'jump',
|
||||
};
|
||||
|
||||
@@ -8,10 +8,7 @@ part of 'weight_unit.dart';
|
||||
|
||||
WeightUnit _$WeightUnitFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(json, requiredKeys: const ['id', 'name']);
|
||||
return WeightUnit(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
);
|
||||
return WeightUnit(id: (json['id'] as num).toInt(), name: json['name'] as String);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$WeightUnitToJson(WeightUnit instance) => <String, dynamic>{
|
||||
|
||||
@@ -130,7 +130,7 @@ class DetailContentWidget extends StatelessWidget {
|
||||
child: Text(
|
||||
dayData.day == null || dayData.day!.isRest
|
||||
? AppLocalizations.of(context).restDay
|
||||
: dayData.day!.name,
|
||||
: dayData.day!.nameWithType,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
||||
@@ -39,10 +39,7 @@ class SetConfigDataWidget extends StatelessWidget {
|
||||
|
||||
return ListTile(
|
||||
leading: InkWell(
|
||||
child: SizedBox(
|
||||
width: 45,
|
||||
child: ExerciseImageWidget(image: exercise.getMainImage),
|
||||
),
|
||||
child: SizedBox(width: 45, child: ExerciseImageWidget(image: exercise.getMainImage)),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
@@ -52,9 +49,7 @@ class SetConfigDataWidget extends StatelessWidget {
|
||||
content: ExerciseDetail(exercise),
|
||||
actions: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
MaterialLocalizations.of(context).closeButtonLabel,
|
||||
),
|
||||
child: Text(MaterialLocalizations.of(context).closeButtonLabel),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
@@ -87,7 +82,7 @@ class RoutineDayWidget extends StatelessWidget {
|
||||
// the one exercise and don't show separate rows for each one.
|
||||
...slotData.setConfigs
|
||||
.fold<Map<Exercise, List<String>>>({}, (acc, entry) {
|
||||
acc.putIfAbsent(entry.exercise, () => []).add(entry.textRepr);
|
||||
acc.putIfAbsent(entry.exercise, () => []).add(entry.textReprWithType);
|
||||
return acc;
|
||||
})
|
||||
.entries
|
||||
@@ -155,7 +150,7 @@ class DayHeader extends StatelessWidget {
|
||||
tileColor: Theme.of(context).focusColor,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
title: Text(
|
||||
_dayData.day!.name,
|
||||
_dayData.day!.nameWithType,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
||||
@@ -102,10 +102,7 @@ class _ReorderableDaysListState extends State<ReorderableDaysList> {
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.delete),
|
||||
onPressed: () => widget._showDeleteConfirmationDialog(
|
||||
context,
|
||||
day,
|
||||
),
|
||||
onPressed: () => widget._showDeleteConfirmationDialog(context, day),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -149,7 +146,11 @@ class _ReorderableDaysListState extends State<ReorderableDaysList> {
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
onTap: () async {
|
||||
final day = Day.empty();
|
||||
final day = Day(
|
||||
routineId: widget.routineId,
|
||||
name: '${i18n.newDay} ${widget.days.length + 1}',
|
||||
order: widget.days.length + 1,
|
||||
);
|
||||
day.name = '${i18n.newDay} ${widget.days.length + 1}';
|
||||
day.routineId = widget.routineId;
|
||||
day.order = widget.days.length + 1;
|
||||
@@ -165,11 +166,10 @@ class _ReorderableDaysListState extends State<ReorderableDaysList> {
|
||||
}
|
||||
|
||||
class DayFormWidget extends StatefulWidget {
|
||||
final int routineId;
|
||||
late final Day day;
|
||||
|
||||
DayFormWidget({required this.routineId, required this.day, super.key}) {
|
||||
day.routineId = routineId;
|
||||
DayFormWidget({required Day day, super.key}) {
|
||||
this.day = day.copyWith();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -181,8 +181,6 @@ class _DayFormWidgetState extends State<DayFormWidget> {
|
||||
|
||||
final descriptionController = TextEditingController();
|
||||
final nameController = TextEditingController();
|
||||
late bool isRestDay;
|
||||
late bool needLogsToAdvance;
|
||||
bool isSaving = false;
|
||||
|
||||
final _form = GlobalKey<FormState>();
|
||||
@@ -190,8 +188,6 @@ class _DayFormWidgetState extends State<DayFormWidget> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
isRestDay = widget.day.isRest;
|
||||
needLogsToAdvance = widget.day.needLogsToAdvance;
|
||||
descriptionController.text = widget.day.description;
|
||||
nameController.text = widget.day.name;
|
||||
}
|
||||
@@ -221,11 +217,13 @@ class _DayFormWidgetState extends State<DayFormWidget> {
|
||||
key: const Key('field-is-rest-day'),
|
||||
title: Text(i18n.isRestDay),
|
||||
subtitle: Text(i18n.isRestDayHelp),
|
||||
value: isRestDay,
|
||||
value: widget.day.isRest,
|
||||
contentPadding: const EdgeInsets.all(4),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isRestDay = value;
|
||||
widget.day.isRest = value;
|
||||
widget.day.type = DayType.custom;
|
||||
widget.day.needLogsToAdvance = false;
|
||||
nameController.clear();
|
||||
descriptionController.clear();
|
||||
});
|
||||
@@ -235,9 +233,7 @@ class _DayFormWidgetState extends State<DayFormWidget> {
|
||||
TextFormField(
|
||||
enabled: !widget.day.isRest,
|
||||
key: const Key('field-name'),
|
||||
decoration: InputDecoration(
|
||||
labelText: i18n.name,
|
||||
),
|
||||
decoration: InputDecoration(labelText: i18n.name),
|
||||
controller: nameController,
|
||||
onSaved: (value) {
|
||||
widget.day.name = value!;
|
||||
@@ -259,6 +255,7 @@ class _DayFormWidgetState extends State<DayFormWidget> {
|
||||
return null;
|
||||
},
|
||||
),
|
||||
|
||||
TextFormField(
|
||||
key: const Key('field-description'),
|
||||
enabled: !widget.day.isRest,
|
||||
@@ -281,19 +278,37 @@ class _DayFormWidgetState extends State<DayFormWidget> {
|
||||
return null;
|
||||
},
|
||||
),
|
||||
DropdownButtonFormField<DayType>(
|
||||
key: const Key('field-day-type'),
|
||||
initialValue: widget.day.type,
|
||||
decoration: const InputDecoration(labelText: 'Typ'),
|
||||
items: DayType.values.map((type) {
|
||||
return DropdownMenuItem(
|
||||
key: Key('day-type-option-${type.name}'),
|
||||
value: type,
|
||||
child: Text('${type.name.toUpperCase()} - ${type.i18Label(i18n)}'),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: widget.day.isRest
|
||||
? null
|
||||
: (value) {
|
||||
setState(() {
|
||||
widget.day.type = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
SwitchListTile(
|
||||
key: const Key('field-need-logs-to-advance'),
|
||||
title: Text(i18n.needsLogsToAdvance),
|
||||
subtitle: Text(i18n.needsLogsToAdvanceHelp),
|
||||
value: needLogsToAdvance,
|
||||
value: widget.day.needLogsToAdvance,
|
||||
contentPadding: const EdgeInsets.all(4),
|
||||
onChanged: widget.day.isRest
|
||||
? null
|
||||
: (value) {
|
||||
setState(() {
|
||||
needLogsToAdvance = value;
|
||||
widget.day.needLogsToAdvance = value;
|
||||
});
|
||||
widget.day.needLogsToAdvance = value;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
||||
@@ -30,11 +30,11 @@ class RiRInputWidget extends StatefulWidget {
|
||||
static const SLIDER_START = -0.5;
|
||||
|
||||
RiRInputWidget(this._initialValue, {required this.onChanged}) {
|
||||
dropdownValue = _initialValue != null ? _initialValue!.toString() : SlotEntry.DEFAULT_RIR;
|
||||
dropdownValue = _initialValue != null ? _initialValue.toString() : SlotEntry.DEFAULT_RIR;
|
||||
|
||||
// Read string RiR into a double
|
||||
if (_initialValue != null) {
|
||||
_currentSetSliderValue = _initialValue!.toDouble();
|
||||
_currentSetSliderValue = _initialValue.toDouble();
|
||||
} else {
|
||||
_currentSetSliderValue = SLIDER_START;
|
||||
}
|
||||
|
||||
@@ -196,6 +196,24 @@ class _SlotEntryFormState extends State<SlotEntryForm> {
|
||||
),
|
||||
],
|
||||
),
|
||||
if (!widget.simpleMode)
|
||||
DropdownButtonFormField<SlotEntryType>(
|
||||
key: const Key('field-slot-entry-type'),
|
||||
initialValue: widget.entry.type,
|
||||
decoration: const InputDecoration(labelText: 'Typ'),
|
||||
items: SlotEntryType.values.map((type) {
|
||||
return DropdownMenuItem(
|
||||
key: Key('slot-entry-type-option-${type.name}'),
|
||||
value: type,
|
||||
child: Text('${type.name.toUpperCase()} - ${type.i18Label(i18n)}'),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
widget.entry.type = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
if (!widget.simpleMode)
|
||||
WeightUnitInputWidget(
|
||||
widget.entry.weightUnitId,
|
||||
@@ -208,6 +226,7 @@ class _SlotEntryFormState extends State<SlotEntryForm> {
|
||||
children: [
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
key: const ValueKey('field-weight'),
|
||||
controller: weightController,
|
||||
keyboardType: textInputTypeDecimal,
|
||||
decoration: InputDecoration(labelText: i18n.weight),
|
||||
@@ -222,6 +241,7 @@ class _SlotEntryFormState extends State<SlotEntryForm> {
|
||||
if (!widget.simpleMode)
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
key: const ValueKey('field-max-weight'),
|
||||
controller: maxWeightController,
|
||||
keyboardType: textInputTypeDecimal,
|
||||
decoration: InputDecoration(labelText: i18n.max),
|
||||
@@ -247,6 +267,7 @@ class _SlotEntryFormState extends State<SlotEntryForm> {
|
||||
children: [
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
key: const ValueKey('field-repetitions'),
|
||||
controller: repetitionsController,
|
||||
keyboardType: textInputTypeDecimal,
|
||||
decoration: InputDecoration(labelText: i18n.repetitions),
|
||||
@@ -261,6 +282,7 @@ class _SlotEntryFormState extends State<SlotEntryForm> {
|
||||
if (!widget.simpleMode)
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
key: const ValueKey('field-max-repetitions'),
|
||||
controller: maxRepetitionsController,
|
||||
keyboardType: textInputTypeDecimal,
|
||||
decoration: InputDecoration(labelText: i18n.max),
|
||||
@@ -280,6 +302,7 @@ class _SlotEntryFormState extends State<SlotEntryForm> {
|
||||
children: [
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
key: const ValueKey('field-rest'),
|
||||
controller: restController,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(labelText: i18n.restTime),
|
||||
@@ -293,6 +316,7 @@ class _SlotEntryFormState extends State<SlotEntryForm> {
|
||||
),
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
key: const ValueKey('field-max-rest'),
|
||||
controller: maxRestController,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(labelText: i18n.max),
|
||||
@@ -605,20 +629,14 @@ class _SlotFormWidgetStateNg extends State<ReorderableSlotList> {
|
||||
Card(
|
||||
child: ListTile(
|
||||
leading: isAddingSlot ? const FormProgressIndicator() : const Icon(Icons.add),
|
||||
title: Text(
|
||||
i18n.addExercise,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
title: Text(i18n.addExercise, style: Theme.of(context).textTheme.titleMedium),
|
||||
onTap: isAddingSlot
|
||||
? null
|
||||
: () async {
|
||||
setState(() => isAddingSlot = true);
|
||||
|
||||
final newSlot = await provider.addSlot(
|
||||
Slot.withData(
|
||||
day: widget.day.id,
|
||||
order: widget.slots.length + 1,
|
||||
),
|
||||
Slot.withData(day: widget.day.id, order: widget.slots.length + 1),
|
||||
widget.day.routineId,
|
||||
);
|
||||
if (mounted) {
|
||||
|
||||
@@ -29,7 +29,7 @@ class WeightUnitInputWidget extends StatefulWidget {
|
||||
late int? selectedWeightUnit;
|
||||
final ValueChanged<int?> onChanged;
|
||||
|
||||
WeightUnitInputWidget(initialValue, {required this.onChanged}) {
|
||||
WeightUnitInputWidget(int? initialValue, {required this.onChanged}) {
|
||||
selectedWeightUnit = initialValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import 'package:wger/models/workouts/log.dart';
|
||||
import 'package:wger/models/workouts/routine.dart';
|
||||
import 'package:wger/models/workouts/set_config_data.dart';
|
||||
import 'package:wger/models/workouts/slot_data.dart';
|
||||
import 'package:wger/models/workouts/slot_entry.dart';
|
||||
import 'package:wger/providers/plate_weights.dart';
|
||||
import 'package:wger/providers/routines.dart';
|
||||
import 'package:wger/screens/configure_plates_screen.dart';
|
||||
@@ -261,6 +262,8 @@ class _LogPageState extends ConsumerState<LogPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
NavigationHeader(
|
||||
@@ -270,15 +273,27 @@ class _LogPageState extends ConsumerState<LogPage> {
|
||||
),
|
||||
|
||||
Container(
|
||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
||||
color: theme.colorScheme.onInverseSurface,
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Center(
|
||||
child: Text(
|
||||
widget._configData.textRepr,
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.headlineMedium?.copyWith(color: Theme.of(context).colorScheme.primary),
|
||||
textAlign: TextAlign.center,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
widget._configData.textRepr,
|
||||
style: theme.textTheme.headlineMedium?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
if (widget._configData.type != SlotEntryType.normal)
|
||||
Text(
|
||||
widget._configData.type.name.toUpperCase(),
|
||||
style: theme.textTheme.headlineMedium?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wger/l10n/generated/app_localizations.dart';
|
||||
import 'package:wger/models/exercises/exercise.dart';
|
||||
import 'package:wger/models/workouts/day.dart';
|
||||
import 'package:wger/models/workouts/day_data.dart';
|
||||
import 'package:wger/widgets/exercises/images.dart';
|
||||
import 'package:wger/widgets/routines/gym_mode/navigation.dart';
|
||||
@@ -24,12 +25,23 @@ class StartPage extends StatelessWidget {
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
if (_dayData.day!.isSpecialType)
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Text(
|
||||
'${_dayData.day!.type.name.toUpperCase()}\n${_dayData.day!.type.i18Label(AppLocalizations.of(context))}',
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
),
|
||||
),
|
||||
..._dayData.slots.map((slotData) {
|
||||
return Column(
|
||||
children: [
|
||||
...slotData.setConfigs
|
||||
.fold<Map<Exercise, List<String>>>({}, (acc, entry) {
|
||||
acc.putIfAbsent(entry.exercise, () => []).add(entry.textRepr);
|
||||
acc.putIfAbsent(entry.exercise, () => []).add(entry.textReprWithType);
|
||||
return acc;
|
||||
})
|
||||
.entries
|
||||
|
||||
@@ -53,10 +53,7 @@ class _RoutineEditState extends State<RoutineEdit> {
|
||||
children: [
|
||||
RoutineForm(widget._routine, useListView: false),
|
||||
Container(height: 10),
|
||||
Text(
|
||||
i18n.routineDays,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
Text(i18n.routineDays, style: Theme.of(context).textTheme.titleLarge),
|
||||
ReorderableDaysList(
|
||||
routineId: widget._routine.id!,
|
||||
days: widget._routine.days.where((day) => day.id != null).toList(),
|
||||
@@ -71,17 +68,9 @@ class _RoutineEditState extends State<RoutineEdit> {
|
||||
});
|
||||
},
|
||||
),
|
||||
if (selectedDay != null)
|
||||
DayFormWidget(
|
||||
key: ValueKey(selectedDayId),
|
||||
day: selectedDay,
|
||||
routineId: widget._routine.id!,
|
||||
),
|
||||
if (selectedDay != null) DayFormWidget(key: ValueKey(selectedDayId), day: selectedDay),
|
||||
const SizedBox(height: 25),
|
||||
Text(
|
||||
i18n.resultingRoutine,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
Text(i18n.resultingRoutine, style: Theme.of(context).textTheme.titleLarge),
|
||||
const Divider(),
|
||||
RoutineDetail(widget._routine, viewMode: true),
|
||||
],
|
||||
|
||||
@@ -27,23 +27,12 @@ import 'package:mockito/src/dummies.dart' as _i5;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
|
||||
_FakeResponse_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeStreamedResponse_1(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [Client].
|
||||
@@ -55,49 +44,21 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
}
|
||||
|
||||
@override
|
||||
_i3.Future<_i2.Response> head(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i3.Future<_i2.Response> head(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#head,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#head, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#head,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_FakeResponse_0(this, Invocation.method(#head, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i3.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i3.Future<_i2.Response> get(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i3.Future<_i2.Response> get(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#get,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#get, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#get,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_FakeResponse_0(this, Invocation.method(#get, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i3.Future<_i2.Response>);
|
||||
@@ -110,26 +71,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i4.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#post,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -144,26 +93,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i4.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#put,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#put,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -178,26 +115,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i4.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -215,11 +140,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
@@ -227,11 +148,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -239,40 +156,19 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
as _i3.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i3.Future<String> read(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i3.Future<String> read(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<String>.value(
|
||||
_i5.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_i5.dummyValue<String>(this, Invocation.method(#read, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i3.Future<String>);
|
||||
|
||||
@override
|
||||
_i3.Future<_i6.Uint8List> readBytes(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i3.Future<_i6.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#readBytes,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#readBytes, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
|
||||
)
|
||||
as _i3.Future<_i6.Uint8List>);
|
||||
@@ -280,28 +176,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
@override
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
Invocation.method(#send, [request]),
|
||||
returnValue: _i3.Future<_i2.StreamedResponse>.value(
|
||||
_FakeStreamedResponse_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
),
|
||||
_FakeStreamedResponse_1(this, Invocation.method(#send, [request])),
|
||||
),
|
||||
)
|
||||
as _i3.Future<_i2.StreamedResponse>);
|
||||
|
||||
@override
|
||||
void close() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#close,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void close() =>
|
||||
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -92,7 +92,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@@ -108,23 +111,35 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
String get author =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#author),
|
||||
returnValue: _i13.dummyValue<String>(this, Invocation.getter(#author)),
|
||||
returnValue: _i13.dummyValue<String>(
|
||||
this,
|
||||
Invocation.getter(#author),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
List<String> get alternateNamesEn =>
|
||||
(super.noSuchMethod(Invocation.getter(#alternateNamesEn), returnValue: <String>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#alternateNamesEn),
|
||||
returnValue: <String>[],
|
||||
)
|
||||
as List<String>);
|
||||
|
||||
@override
|
||||
List<String> get alternateNamesTrans =>
|
||||
(super.noSuchMethod(Invocation.getter(#alternateNamesTrans), returnValue: <String>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#alternateNamesTrans),
|
||||
returnValue: <String>[],
|
||||
)
|
||||
as List<String>);
|
||||
|
||||
@override
|
||||
List<_i8.Equipment> get equipment =>
|
||||
(super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#equipment),
|
||||
returnValue: <_i8.Equipment>[],
|
||||
)
|
||||
as List<_i8.Equipment>);
|
||||
|
||||
@override
|
||||
@@ -141,12 +156,18 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
|
||||
@override
|
||||
List<_i9.Muscle> get primaryMuscles =>
|
||||
(super.noSuchMethod(Invocation.getter(#primaryMuscles), returnValue: <_i9.Muscle>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#primaryMuscles),
|
||||
returnValue: <_i9.Muscle>[],
|
||||
)
|
||||
as List<_i9.Muscle>);
|
||||
|
||||
@override
|
||||
List<_i9.Muscle> get secondaryMuscles =>
|
||||
(super.noSuchMethod(Invocation.getter(#secondaryMuscles), returnValue: <_i9.Muscle>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#secondaryMuscles),
|
||||
returnValue: <_i9.Muscle>[],
|
||||
)
|
||||
as List<_i9.Muscle>);
|
||||
|
||||
@override
|
||||
@@ -161,8 +182,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
as _i14.ExerciseSubmissionApi);
|
||||
|
||||
@override
|
||||
set author(String? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#author, value), returnValueForMissingStub: null);
|
||||
set author(String? value) => super.noSuchMethod(
|
||||
Invocation.setter(#author, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set exerciseNameEn(String? value) => super.noSuchMethod(
|
||||
@@ -177,8 +200,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
);
|
||||
|
||||
@override
|
||||
set descriptionEn(String? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#descriptionEn, value), returnValueForMissingStub: null);
|
||||
set descriptionEn(String? value) => super.noSuchMethod(
|
||||
Invocation.setter(#descriptionEn, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set descriptionTrans(String? value) => super.noSuchMethod(
|
||||
@@ -187,8 +212,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
);
|
||||
|
||||
@override
|
||||
set languageEn(_i10.Language? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#languageEn, value), returnValueForMissingStub: null);
|
||||
set languageEn(_i10.Language? value) => super.noSuchMethod(
|
||||
Invocation.setter(#languageEn, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set languageTranslation(_i10.Language? value) => super.noSuchMethod(
|
||||
@@ -209,12 +236,16 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
);
|
||||
|
||||
@override
|
||||
set category(_i7.ExerciseCategory? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#category, value), returnValueForMissingStub: null);
|
||||
set category(_i7.ExerciseCategory? value) => super.noSuchMethod(
|
||||
Invocation.setter(#category, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set equipment(List<_i8.Equipment>? equipment) =>
|
||||
super.noSuchMethod(Invocation.setter(#equipment, equipment), returnValueForMissingStub: null);
|
||||
set equipment(List<_i8.Equipment>? equipment) => super.noSuchMethod(
|
||||
Invocation.setter(#equipment, equipment),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set variationConnectToExercise(int? value) => super.noSuchMethod(
|
||||
@@ -245,8 +276,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void addExerciseImages(List<_i12.ExerciseSubmissionImage>? images) => super.noSuchMethod(
|
||||
@@ -255,8 +288,10 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
);
|
||||
|
||||
@override
|
||||
void removeImage(String? path) =>
|
||||
super.noSuchMethod(Invocation.method(#removeImage, [path]), returnValueForMissingStub: null);
|
||||
void removeImage(String? path) => super.noSuchMethod(
|
||||
Invocation.method(#removeImage, [path]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i15.Future<int> postExerciseToServer() =>
|
||||
@@ -304,12 +339,16 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [UserProvider].
|
||||
@@ -322,14 +361,20 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider {
|
||||
|
||||
@override
|
||||
_i18.ThemeMode get themeMode =>
|
||||
(super.noSuchMethod(Invocation.getter(#themeMode), returnValue: _i18.ThemeMode.system)
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#themeMode),
|
||||
returnValue: _i18.ThemeMode.system,
|
||||
)
|
||||
as _i18.ThemeMode);
|
||||
|
||||
@override
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@@ -337,33 +382,46 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider {
|
||||
_i4.SharedPreferencesAsync get prefs =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#prefs),
|
||||
returnValue: _FakeSharedPreferencesAsync_2(this, Invocation.getter(#prefs)),
|
||||
returnValue: _FakeSharedPreferencesAsync_2(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
),
|
||||
)
|
||||
as _i4.SharedPreferencesAsync);
|
||||
|
||||
@override
|
||||
set themeMode(_i18.ThemeMode? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#themeMode, value), returnValueForMissingStub: null);
|
||||
set themeMode(_i18.ThemeMode? value) => super.noSuchMethod(
|
||||
Invocation.setter(#themeMode, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set prefs(_i4.SharedPreferencesAsync? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#prefs, value), returnValueForMissingStub: null);
|
||||
set prefs(_i4.SharedPreferencesAsync? value) => super.noSuchMethod(
|
||||
Invocation.setter(#prefs, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set profile(_i19.Profile? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#profile, value), returnValueForMissingStub: null);
|
||||
set profile(_i19.Profile? value) => super.noSuchMethod(
|
||||
Invocation.setter(#profile, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void setThemeMode(_i18.ThemeMode? mode) =>
|
||||
super.noSuchMethod(Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null);
|
||||
void setThemeMode(_i18.ThemeMode? mode) => super.noSuchMethod(
|
||||
Invocation.method(#setThemeMode, [mode]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i15.Future<void> fetchAndSetProfile() =>
|
||||
@@ -405,12 +463,16 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [ExercisesProvider].
|
||||
@@ -425,7 +487,10 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@@ -433,18 +498,27 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
_i5.ExerciseDatabase get database =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#database),
|
||||
returnValue: _FakeExerciseDatabase_3(this, Invocation.getter(#database)),
|
||||
returnValue: _FakeExerciseDatabase_3(
|
||||
this,
|
||||
Invocation.getter(#database),
|
||||
),
|
||||
)
|
||||
as _i5.ExerciseDatabase);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> get exercises =>
|
||||
(super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i6.Exercise>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#exercises),
|
||||
returnValue: <_i6.Exercise>[],
|
||||
)
|
||||
as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> get filteredExercises =>
|
||||
(super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#filteredExercises),
|
||||
returnValue: <_i6.Exercise>[],
|
||||
)
|
||||
as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
@@ -457,31 +531,47 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
|
||||
@override
|
||||
List<_i7.ExerciseCategory> get categories =>
|
||||
(super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i7.ExerciseCategory>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#categories),
|
||||
returnValue: <_i7.ExerciseCategory>[],
|
||||
)
|
||||
as List<_i7.ExerciseCategory>);
|
||||
|
||||
@override
|
||||
List<_i9.Muscle> get muscles =>
|
||||
(super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i9.Muscle>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#muscles),
|
||||
returnValue: <_i9.Muscle>[],
|
||||
)
|
||||
as List<_i9.Muscle>);
|
||||
|
||||
@override
|
||||
List<_i8.Equipment> get equipment =>
|
||||
(super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#equipment),
|
||||
returnValue: <_i8.Equipment>[],
|
||||
)
|
||||
as List<_i8.Equipment>);
|
||||
|
||||
@override
|
||||
List<_i10.Language> get languages =>
|
||||
(super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i10.Language>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#languages),
|
||||
returnValue: <_i10.Language>[],
|
||||
)
|
||||
as List<_i10.Language>);
|
||||
|
||||
@override
|
||||
set database(_i5.ExerciseDatabase? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
|
||||
set database(_i5.ExerciseDatabase? value) => super.noSuchMethod(
|
||||
Invocation.setter(#database, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set exercises(List<_i6.Exercise>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null);
|
||||
set exercises(List<_i6.Exercise>? value) => super.noSuchMethod(
|
||||
Invocation.setter(#exercises, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
@@ -490,8 +580,10 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set languages(List<_i10.Language>? languages) =>
|
||||
super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null);
|
||||
set languages(List<_i10.Language>? languages) => super.noSuchMethod(
|
||||
Invocation.setter(#languages, languages),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
@@ -507,8 +599,10 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
void initFilters() =>
|
||||
super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null);
|
||||
void initFilters() => super.noSuchMethod(
|
||||
Invocation.method(#initFilters, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i15.Future<void> findByFilters() =>
|
||||
@@ -520,19 +614,27 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i6.Exercise findExerciseById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findExerciseById, [id]),
|
||||
returnValue: _FakeExercise_4(this, Invocation.method(#findExerciseById, [id])),
|
||||
returnValue: _FakeExercise_4(
|
||||
this,
|
||||
Invocation.method(#findExerciseById, [id]),
|
||||
),
|
||||
)
|
||||
as _i6.Exercise);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) =>
|
||||
List<_i6.Exercise> findExercisesByVariationId(
|
||||
int? variationId, {
|
||||
int? exerciseIdToExclude,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findExercisesByVariationId,
|
||||
@@ -547,7 +649,10 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
_i7.ExerciseCategory findCategoryById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findCategoryById, [id]),
|
||||
returnValue: _FakeExerciseCategory_5(this, Invocation.method(#findCategoryById, [id])),
|
||||
returnValue: _FakeExerciseCategory_5(
|
||||
this,
|
||||
Invocation.method(#findCategoryById, [id]),
|
||||
),
|
||||
)
|
||||
as _i7.ExerciseCategory);
|
||||
|
||||
@@ -555,7 +660,10 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
_i8.Equipment findEquipmentById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findEquipmentById, [id]),
|
||||
returnValue: _FakeEquipment_6(this, Invocation.method(#findEquipmentById, [id])),
|
||||
returnValue: _FakeEquipment_6(
|
||||
this,
|
||||
Invocation.method(#findEquipmentById, [id]),
|
||||
),
|
||||
)
|
||||
as _i8.Equipment);
|
||||
|
||||
@@ -563,7 +671,10 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
_i9.Muscle findMuscleById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findMuscleById, [id]),
|
||||
returnValue: _FakeMuscle_7(this, Invocation.method(#findMuscleById, [id])),
|
||||
returnValue: _FakeMuscle_7(
|
||||
this,
|
||||
Invocation.method(#findMuscleById, [id]),
|
||||
),
|
||||
)
|
||||
as _i9.Muscle);
|
||||
|
||||
@@ -571,7 +682,10 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
_i10.Language findLanguageById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findLanguageById, [id]),
|
||||
returnValue: _FakeLanguage_8(this, Invocation.method(#findLanguageById, [id])),
|
||||
returnValue: _FakeLanguage_8(
|
||||
this,
|
||||
Invocation.method(#findLanguageById, [id]),
|
||||
),
|
||||
)
|
||||
as _i10.Language);
|
||||
|
||||
@@ -634,11 +748,17 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
int? exerciseId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [
|
||||
database,
|
||||
exerciseId,
|
||||
]),
|
||||
returnValue: _i15.Future<_i6.Exercise>.value(
|
||||
_FakeExercise_4(
|
||||
this,
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [
|
||||
database,
|
||||
exerciseId,
|
||||
]),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -647,7 +767,9 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
@override
|
||||
_i15.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}),
|
||||
Invocation.method(#initCacheTimesLocalPrefs, [], {
|
||||
#forceInit: forceInit,
|
||||
}),
|
||||
returnValue: _i15.Future<void>.value(),
|
||||
returnValueForMissingStub: _i15.Future<void>.value(),
|
||||
)
|
||||
@@ -744,7 +866,9 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
[name],
|
||||
{#languageCode: languageCode, #searchEnglish: searchEnglish},
|
||||
),
|
||||
returnValue: _i15.Future<List<_i6.Exercise>>.value(<_i6.Exercise>[]),
|
||||
returnValue: _i15.Future<List<_i6.Exercise>>.value(
|
||||
<_i6.Exercise>[],
|
||||
),
|
||||
)
|
||||
as _i15.Future<List<_i6.Exercise>>);
|
||||
|
||||
@@ -761,10 +885,14 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -29,43 +29,19 @@ import 'package:wger/providers/gallery.dart' as _i4;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
|
||||
_FakeAuthProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
|
||||
_FakeClient_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeUri_2 extends _i1.SmartFake implements Uri {
|
||||
_FakeUri_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
_FakeResponse_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [GalleryProvider].
|
||||
@@ -78,29 +54,18 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Image> get images =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#images),
|
||||
returnValue: <_i5.Image>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#images), returnValue: <_i5.Image>[])
|
||||
as List<_i5.Image>);
|
||||
|
||||
@override
|
||||
set images(List<_i5.Image>? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#images,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set images(List<_i5.Image>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#images, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i2.AuthProvider get auth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#auth),
|
||||
returnValue: _FakeAuthProvider_0(
|
||||
this,
|
||||
Invocation.getter(#auth),
|
||||
),
|
||||
returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)),
|
||||
)
|
||||
as _i2.AuthProvider);
|
||||
|
||||
@@ -108,91 +73,48 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
_i3.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_1(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_1(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#auth,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i6.Future<void> fetchAndSetGallery() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetGallery,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetGallery, []),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
)
|
||||
as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> addImage(
|
||||
_i5.Image? image,
|
||||
_i7.XFile? imageFile,
|
||||
) =>
|
||||
_i6.Future<void> addImage(_i5.Image? image, _i7.XFile? imageFile) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addImage,
|
||||
[
|
||||
image,
|
||||
imageFile,
|
||||
],
|
||||
),
|
||||
Invocation.method(#addImage, [image, imageFile]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
)
|
||||
as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> editImage(
|
||||
_i5.Image? image,
|
||||
_i7.XFile? imageFile,
|
||||
) =>
|
||||
_i6.Future<void> editImage(_i5.Image? image, _i7.XFile? imageFile) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editImage,
|
||||
[
|
||||
image,
|
||||
imageFile,
|
||||
],
|
||||
),
|
||||
Invocation.method(#editImage, [image, imageFile]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
)
|
||||
@@ -201,10 +123,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
@override
|
||||
_i6.Future<void> deleteImage(_i5.Image? image) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteImage,
|
||||
[image],
|
||||
),
|
||||
Invocation.method(#deleteImage, [image]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
)
|
||||
@@ -213,42 +132,25 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
returnValue: _FakeUri_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -257,10 +159,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
@override
|
||||
_i6.Future<dynamic> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i6.Future<dynamic>.value(),
|
||||
)
|
||||
as _i6.Future<dynamic>);
|
||||
@@ -268,109 +167,54 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
@override
|
||||
_i6.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i6.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i6.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i6.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i6.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<_i3.Response> deleteRequest(
|
||||
String? url,
|
||||
int? id,
|
||||
) =>
|
||||
_i6.Future<_i3.Response> deleteRequest(String? url, int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i6.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
),
|
||||
)
|
||||
as _i6.Future<_i3.Response>);
|
||||
|
||||
@override
|
||||
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -29,43 +29,19 @@ import 'package:wger/providers/gallery.dart' as _i4;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
|
||||
_FakeAuthProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
|
||||
_FakeClient_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeUri_2 extends _i1.SmartFake implements Uri {
|
||||
_FakeUri_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
_FakeResponse_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [GalleryProvider].
|
||||
@@ -78,29 +54,18 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Image> get images =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#images),
|
||||
returnValue: <_i5.Image>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#images), returnValue: <_i5.Image>[])
|
||||
as List<_i5.Image>);
|
||||
|
||||
@override
|
||||
set images(List<_i5.Image>? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#images,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set images(List<_i5.Image>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#images, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i2.AuthProvider get auth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#auth),
|
||||
returnValue: _FakeAuthProvider_0(
|
||||
this,
|
||||
Invocation.getter(#auth),
|
||||
),
|
||||
returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)),
|
||||
)
|
||||
as _i2.AuthProvider);
|
||||
|
||||
@@ -108,91 +73,48 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
_i3.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_1(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_1(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#auth,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i6.Future<void> fetchAndSetGallery() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetGallery,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetGallery, []),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
)
|
||||
as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> addImage(
|
||||
_i5.Image? image,
|
||||
_i7.XFile? imageFile,
|
||||
) =>
|
||||
_i6.Future<void> addImage(_i5.Image? image, _i7.XFile? imageFile) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addImage,
|
||||
[
|
||||
image,
|
||||
imageFile,
|
||||
],
|
||||
),
|
||||
Invocation.method(#addImage, [image, imageFile]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
)
|
||||
as _i6.Future<void>);
|
||||
|
||||
@override
|
||||
_i6.Future<void> editImage(
|
||||
_i5.Image? image,
|
||||
_i7.XFile? imageFile,
|
||||
) =>
|
||||
_i6.Future<void> editImage(_i5.Image? image, _i7.XFile? imageFile) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editImage,
|
||||
[
|
||||
image,
|
||||
imageFile,
|
||||
],
|
||||
),
|
||||
Invocation.method(#editImage, [image, imageFile]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
)
|
||||
@@ -201,10 +123,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
@override
|
||||
_i6.Future<void> deleteImage(_i5.Image? image) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteImage,
|
||||
[image],
|
||||
),
|
||||
Invocation.method(#deleteImage, [image]),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
)
|
||||
@@ -213,42 +132,25 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
returnValue: _FakeUri_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -257,10 +159,7 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
@override
|
||||
_i6.Future<dynamic> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i6.Future<dynamic>.value(),
|
||||
)
|
||||
as _i6.Future<dynamic>);
|
||||
@@ -268,109 +167,54 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider {
|
||||
@override
|
||||
_i6.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i6.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i6.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i6.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i6.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i6.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i6.Future<_i3.Response> deleteRequest(
|
||||
String? url,
|
||||
int? id,
|
||||
) =>
|
||||
_i6.Future<_i3.Response> deleteRequest(String? url, int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i6.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
),
|
||||
)
|
||||
as _i6.Future<_i3.Response>);
|
||||
|
||||
@override
|
||||
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -28,23 +28,13 @@ import 'package:wger/providers/measurement.dart' as _i4;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeMeasurementCategory_1 extends _i1.SmartFake implements _i3.MeasurementCategory {
|
||||
_FakeMeasurementCategory_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeMeasurementCategory_1(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [MeasurementProvider].
|
||||
@@ -59,51 +49,30 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i3.MeasurementCategory> get categories =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#categories),
|
||||
returnValue: <_i3.MeasurementCategory>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i3.MeasurementCategory>[])
|
||||
as List<_i3.MeasurementCategory>);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i3.MeasurementCategory findCategoryById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findCategoryById,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#findCategoryById, [id]),
|
||||
returnValue: _FakeMeasurementCategory_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#findCategoryById,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#findCategoryById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.MeasurementCategory);
|
||||
@@ -111,10 +80,7 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
@override
|
||||
_i5.Future<void> fetchAndSetCategories() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategories,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetCategories, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -123,10 +89,7 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
@override
|
||||
_i5.Future<void> fetchAndSetCategoryEntries(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetCategoryEntries,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#fetchAndSetCategoryEntries, [id]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -135,10 +98,7 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
@override
|
||||
_i5.Future<void> fetchAndSetAllCategoriesAndEntries() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllCategoriesAndEntries,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllCategoriesAndEntries, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -147,10 +107,7 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
@override
|
||||
_i5.Future<void> addCategory(_i3.MeasurementCategory? category) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addCategory,
|
||||
[category],
|
||||
),
|
||||
Invocation.method(#addCategory, [category]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -159,30 +116,16 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
@override
|
||||
_i5.Future<void> deleteCategory(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteCategory,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deleteCategory, [id]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> editCategory(
|
||||
int? id,
|
||||
String? newName,
|
||||
String? newUnit,
|
||||
) =>
|
||||
_i5.Future<void> editCategory(int? id, String? newName, String? newUnit) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editCategory,
|
||||
[
|
||||
id,
|
||||
newName,
|
||||
newUnit,
|
||||
],
|
||||
),
|
||||
Invocation.method(#editCategory, [id, newName, newUnit]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -191,28 +134,16 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
@override
|
||||
_i5.Future<void> addEntry(_i6.MeasurementEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
),
|
||||
Invocation.method(#addEntry, [entry]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
as _i5.Future<void>);
|
||||
|
||||
@override
|
||||
_i5.Future<void> deleteEntry(
|
||||
int? id,
|
||||
int? categoryId,
|
||||
) =>
|
||||
_i5.Future<void> deleteEntry(int? id, int? categoryId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEntry,
|
||||
[
|
||||
id,
|
||||
categoryId,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteEntry, [id, categoryId]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -227,16 +158,7 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
DateTime? newDate,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editEntry,
|
||||
[
|
||||
id,
|
||||
categoryId,
|
||||
newValue,
|
||||
newNotes,
|
||||
newDate,
|
||||
],
|
||||
),
|
||||
Invocation.method(#editEntry, [id, categoryId, newValue, newNotes, newDate]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -244,37 +166,21 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide
|
||||
|
||||
@override
|
||||
void addListener(_i7.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -26,43 +26,19 @@ import 'package:wger/providers/base_provider.dart' as _i4;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
|
||||
_FakeAuthProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
|
||||
_FakeClient_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeUri_2 extends _i1.SmartFake implements Uri {
|
||||
_FakeUri_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
_FakeResponse_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [WgerBaseProvider].
|
||||
@@ -77,10 +53,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i2.AuthProvider get auth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#auth),
|
||||
returnValue: _FakeAuthProvider_0(
|
||||
this,
|
||||
Invocation.getter(#auth),
|
||||
),
|
||||
returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)),
|
||||
)
|
||||
as _i2.AuthProvider);
|
||||
|
||||
@@ -88,70 +61,40 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i3.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_1(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_1(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#auth,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
returnValue: _FakeUri_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -160,10 +103,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<dynamic> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
)
|
||||
as _i5.Future<dynamic>);
|
||||
@@ -171,72 +111,33 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
String? url,
|
||||
int? id,
|
||||
) =>
|
||||
_i5.Future<_i3.Response> deleteRequest(String? url, int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.Response>);
|
||||
|
||||
@@ -31,63 +31,30 @@ import 'package:wger/providers/nutrition.dart' as _i8;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase {
|
||||
_FakeIngredientDatabase_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeIngredientDatabase_1(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan {
|
||||
_FakeNutritionalPlan_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeNutritionalPlan_2(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeMeal_3 extends _i1.SmartFake implements _i5.Meal {
|
||||
_FakeMeal_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeMeal_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeMealItem_4 extends _i1.SmartFake implements _i6.MealItem {
|
||||
_FakeMealItem_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeMealItem_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient {
|
||||
_FakeIngredient_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeIngredient_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
@@ -102,10 +69,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@@ -113,98 +77,52 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
_i3.IngredientDatabase get database =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#database),
|
||||
returnValue: _FakeIngredientDatabase_1(
|
||||
this,
|
||||
Invocation.getter(#database),
|
||||
),
|
||||
returnValue: _FakeIngredientDatabase_1(this, Invocation.getter(#database)),
|
||||
)
|
||||
as _i3.IngredientDatabase);
|
||||
|
||||
@override
|
||||
List<_i7.Ingredient> get ingredients =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#ingredients),
|
||||
returnValue: <_i7.Ingredient>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i7.Ingredient>[])
|
||||
as List<_i7.Ingredient>);
|
||||
|
||||
@override
|
||||
List<_i4.NutritionalPlan> get items =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i4.NutritionalPlan>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i4.NutritionalPlan>[])
|
||||
as List<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
set database(_i3.IngredientDatabase? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#database,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set database(_i3.IngredientDatabase? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set ingredients(List<_i7.Ingredient>? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#ingredients,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set ingredients(List<_i7.Ingredient>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#ingredients, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i4.NutritionalPlan findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
),
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeNutritionalPlan_2(this, Invocation.method(#findById, [id])),
|
||||
)
|
||||
as _i4.NutritionalPlan);
|
||||
|
||||
@override
|
||||
_i5.Meal? findMealById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findMealById,
|
||||
[id],
|
||||
),
|
||||
)
|
||||
as _i5.Meal?);
|
||||
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetAllPlansSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -213,10 +131,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetAllPlansFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansFull,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -225,18 +140,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
Invocation.method(#fetchAndSetPlanSparse, [planId]),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanSparse, [planId])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i4.NutritionalPlan>);
|
||||
@@ -244,18 +150,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
Invocation.method(#fetchAndSetPlanFull, [planId]),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanFull, [planId])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i4.NutritionalPlan>);
|
||||
@@ -263,18 +160,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
Invocation.method(#addPlan, [planData]),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_2(this, Invocation.method(#addPlan, [planData])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i4.NutritionalPlan>);
|
||||
@@ -282,10 +170,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> editPlan(_i4.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editPlan,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#editPlan, [plan]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -294,39 +179,18 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deletePlan,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i5.Meal> addMeal(
|
||||
_i5.Meal? meal,
|
||||
int? planId,
|
||||
) =>
|
||||
_i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addMeal,
|
||||
[
|
||||
meal,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
Invocation.method(#addMeal, [meal, planId]),
|
||||
returnValue: _i9.Future<_i5.Meal>.value(
|
||||
_FakeMeal_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addMeal,
|
||||
[
|
||||
meal,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeMeal_3(this, Invocation.method(#addMeal, [meal, planId])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i5.Meal>);
|
||||
@@ -334,18 +198,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editMeal,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#editMeal, [meal]),
|
||||
returnValue: _i9.Future<_i5.Meal>.value(
|
||||
_FakeMeal_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editMeal,
|
||||
[meal],
|
||||
),
|
||||
),
|
||||
_FakeMeal_3(this, Invocation.method(#editMeal, [meal])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i5.Meal>);
|
||||
@@ -353,39 +208,18 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> deleteMeal(_i5.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMeal,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#deleteMeal, [meal]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i6.MealItem> addMealItem(
|
||||
_i6.MealItem? mealItem,
|
||||
_i5.Meal? meal,
|
||||
) =>
|
||||
_i9.Future<_i6.MealItem> addMealItem(_i6.MealItem? mealItem, _i5.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addMealItem,
|
||||
[
|
||||
mealItem,
|
||||
meal,
|
||||
],
|
||||
),
|
||||
Invocation.method(#addMealItem, [mealItem, meal]),
|
||||
returnValue: _i9.Future<_i6.MealItem>.value(
|
||||
_FakeMealItem_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addMealItem,
|
||||
[
|
||||
mealItem,
|
||||
meal,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeMealItem_4(this, Invocation.method(#addMealItem, [mealItem, meal])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i6.MealItem>);
|
||||
@@ -393,10 +227,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
),
|
||||
Invocation.method(#deleteMealItem, [mealItem]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -405,10 +236,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> clearIngredientCache() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearIngredientCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#clearIngredientCache, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -420,19 +248,11 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
_i3.IngredientDatabase? database,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
{#database: database},
|
||||
),
|
||||
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
|
||||
returnValue: _i9.Future<_i7.Ingredient>.value(
|
||||
_FakeIngredient_5(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
{#database: database},
|
||||
),
|
||||
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -441,10 +261,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> fetchIngredientsFromCache() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredientsFromCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchIngredientsFromCache, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -460,10 +277,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
Invocation.method(
|
||||
#searchIngredient,
|
||||
[name],
|
||||
{
|
||||
#languageCode: languageCode,
|
||||
#searchEnglish: searchEnglish,
|
||||
},
|
||||
{#languageCode: languageCode, #searchEnglish: searchEnglish},
|
||||
),
|
||||
returnValue: _i9.Future<List<_i7.Ingredient>>.value(<_i7.Ingredient>[]),
|
||||
)
|
||||
@@ -472,27 +286,15 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithBarcode(String? barcode) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithBarcode,
|
||||
[barcode],
|
||||
),
|
||||
Invocation.method(#searchIngredientWithBarcode, [barcode]),
|
||||
returnValue: _i9.Future<_i7.Ingredient?>.value(),
|
||||
)
|
||||
as _i9.Future<_i7.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> logMealToDiary(
|
||||
_i5.Meal? meal,
|
||||
DateTime? mealDateTime,
|
||||
) =>
|
||||
_i9.Future<void> logMealToDiary(_i5.Meal? meal, DateTime? mealDateTime) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logMealToDiary,
|
||||
[
|
||||
meal,
|
||||
mealDateTime,
|
||||
],
|
||||
),
|
||||
Invocation.method(#logMealToDiary, [meal, mealDateTime]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -505,32 +307,16 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
DateTime? dateTime,
|
||||
]) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logIngredientToDiary,
|
||||
[
|
||||
mealItem,
|
||||
planId,
|
||||
dateTime,
|
||||
],
|
||||
),
|
||||
Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deleteLog(
|
||||
int? logId,
|
||||
int? planId,
|
||||
) =>
|
||||
_i9.Future<void> deleteLog(int? logId, int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[
|
||||
logId,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteLog, [logId, planId]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -539,10 +325,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#fetchAndSetLogs, [plan]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -550,37 +333,21 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
|
||||
@override
|
||||
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -31,63 +31,30 @@ import 'package:wger/providers/nutrition.dart' as _i8;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_1 extends _i1.SmartFake implements _i3.IngredientDatabase {
|
||||
_FakeIngredientDatabase_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeIngredientDatabase_1(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_2 extends _i1.SmartFake implements _i4.NutritionalPlan {
|
||||
_FakeNutritionalPlan_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeNutritionalPlan_2(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeMeal_3 extends _i1.SmartFake implements _i5.Meal {
|
||||
_FakeMeal_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeMeal_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeMealItem_4 extends _i1.SmartFake implements _i6.MealItem {
|
||||
_FakeMealItem_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeMealItem_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeIngredient_5 extends _i1.SmartFake implements _i7.Ingredient {
|
||||
_FakeIngredient_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeIngredient_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
@@ -102,10 +69,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@@ -113,98 +77,52 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
_i3.IngredientDatabase get database =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#database),
|
||||
returnValue: _FakeIngredientDatabase_1(
|
||||
this,
|
||||
Invocation.getter(#database),
|
||||
),
|
||||
returnValue: _FakeIngredientDatabase_1(this, Invocation.getter(#database)),
|
||||
)
|
||||
as _i3.IngredientDatabase);
|
||||
|
||||
@override
|
||||
List<_i7.Ingredient> get ingredients =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#ingredients),
|
||||
returnValue: <_i7.Ingredient>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i7.Ingredient>[])
|
||||
as List<_i7.Ingredient>);
|
||||
|
||||
@override
|
||||
List<_i4.NutritionalPlan> get items =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i4.NutritionalPlan>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i4.NutritionalPlan>[])
|
||||
as List<_i4.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
set database(_i3.IngredientDatabase? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#database,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set database(_i3.IngredientDatabase? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set ingredients(List<_i7.Ingredient>? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#ingredients,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set ingredients(List<_i7.Ingredient>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#ingredients, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i4.NutritionalPlan findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
),
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeNutritionalPlan_2(this, Invocation.method(#findById, [id])),
|
||||
)
|
||||
as _i4.NutritionalPlan);
|
||||
|
||||
@override
|
||||
_i5.Meal? findMealById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findMealById,
|
||||
[id],
|
||||
),
|
||||
)
|
||||
as _i5.Meal?);
|
||||
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?);
|
||||
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetAllPlansSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -213,10 +131,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetAllPlansFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansFull,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -225,18 +140,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
Invocation.method(#fetchAndSetPlanSparse, [planId]),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanSparse, [planId])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i4.NutritionalPlan>);
|
||||
@@ -244,18 +150,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
Invocation.method(#fetchAndSetPlanFull, [planId]),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanFull, [planId])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i4.NutritionalPlan>);
|
||||
@@ -263,18 +160,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
Invocation.method(#addPlan, [planData]),
|
||||
returnValue: _i9.Future<_i4.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_2(this, Invocation.method(#addPlan, [planData])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i4.NutritionalPlan>);
|
||||
@@ -282,10 +170,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> editPlan(_i4.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editPlan,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#editPlan, [plan]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -294,39 +179,18 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deletePlan,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i5.Meal> addMeal(
|
||||
_i5.Meal? meal,
|
||||
int? planId,
|
||||
) =>
|
||||
_i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addMeal,
|
||||
[
|
||||
meal,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
Invocation.method(#addMeal, [meal, planId]),
|
||||
returnValue: _i9.Future<_i5.Meal>.value(
|
||||
_FakeMeal_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addMeal,
|
||||
[
|
||||
meal,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeMeal_3(this, Invocation.method(#addMeal, [meal, planId])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i5.Meal>);
|
||||
@@ -334,18 +198,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editMeal,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#editMeal, [meal]),
|
||||
returnValue: _i9.Future<_i5.Meal>.value(
|
||||
_FakeMeal_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editMeal,
|
||||
[meal],
|
||||
),
|
||||
),
|
||||
_FakeMeal_3(this, Invocation.method(#editMeal, [meal])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i5.Meal>);
|
||||
@@ -353,39 +208,18 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> deleteMeal(_i5.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMeal,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#deleteMeal, [meal]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<_i6.MealItem> addMealItem(
|
||||
_i6.MealItem? mealItem,
|
||||
_i5.Meal? meal,
|
||||
) =>
|
||||
_i9.Future<_i6.MealItem> addMealItem(_i6.MealItem? mealItem, _i5.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addMealItem,
|
||||
[
|
||||
mealItem,
|
||||
meal,
|
||||
],
|
||||
),
|
||||
Invocation.method(#addMealItem, [mealItem, meal]),
|
||||
returnValue: _i9.Future<_i6.MealItem>.value(
|
||||
_FakeMealItem_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addMealItem,
|
||||
[
|
||||
mealItem,
|
||||
meal,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeMealItem_4(this, Invocation.method(#addMealItem, [mealItem, meal])),
|
||||
),
|
||||
)
|
||||
as _i9.Future<_i6.MealItem>);
|
||||
@@ -393,10 +227,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> deleteMealItem(_i6.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
),
|
||||
Invocation.method(#deleteMealItem, [mealItem]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -405,10 +236,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> clearIngredientCache() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearIngredientCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#clearIngredientCache, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -420,19 +248,11 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
_i3.IngredientDatabase? database,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
{#database: database},
|
||||
),
|
||||
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
|
||||
returnValue: _i9.Future<_i7.Ingredient>.value(
|
||||
_FakeIngredient_5(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
{#database: database},
|
||||
),
|
||||
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -441,10 +261,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> fetchIngredientsFromCache() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredientsFromCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchIngredientsFromCache, []),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -460,10 +277,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
Invocation.method(
|
||||
#searchIngredient,
|
||||
[name],
|
||||
{
|
||||
#languageCode: languageCode,
|
||||
#searchEnglish: searchEnglish,
|
||||
},
|
||||
{#languageCode: languageCode, #searchEnglish: searchEnglish},
|
||||
),
|
||||
returnValue: _i9.Future<List<_i7.Ingredient>>.value(<_i7.Ingredient>[]),
|
||||
)
|
||||
@@ -472,27 +286,15 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<_i7.Ingredient?> searchIngredientWithBarcode(String? barcode) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithBarcode,
|
||||
[barcode],
|
||||
),
|
||||
Invocation.method(#searchIngredientWithBarcode, [barcode]),
|
||||
returnValue: _i9.Future<_i7.Ingredient?>.value(),
|
||||
)
|
||||
as _i9.Future<_i7.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> logMealToDiary(
|
||||
_i5.Meal? meal,
|
||||
DateTime? mealDateTime,
|
||||
) =>
|
||||
_i9.Future<void> logMealToDiary(_i5.Meal? meal, DateTime? mealDateTime) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logMealToDiary,
|
||||
[
|
||||
meal,
|
||||
mealDateTime,
|
||||
],
|
||||
),
|
||||
Invocation.method(#logMealToDiary, [meal, mealDateTime]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -505,32 +307,16 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
DateTime? dateTime,
|
||||
]) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logIngredientToDiary,
|
||||
[
|
||||
mealItem,
|
||||
planId,
|
||||
dateTime,
|
||||
],
|
||||
),
|
||||
Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
as _i9.Future<void>);
|
||||
|
||||
@override
|
||||
_i9.Future<void> deleteLog(
|
||||
int? logId,
|
||||
int? planId,
|
||||
) =>
|
||||
_i9.Future<void> deleteLog(int? logId, int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[
|
||||
logId,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteLog, [logId, planId]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -539,10 +325,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
@override
|
||||
_i9.Future<void> fetchAndSetLogs(_i4.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#fetchAndSetLogs, [plan]),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
)
|
||||
@@ -550,37 +333,21 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP
|
||||
|
||||
@override
|
||||
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -31,53 +31,24 @@ import 'package:wger/providers/base_provider.dart' as _i4;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
|
||||
_FakeAuthProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
|
||||
_FakeClient_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeUri_2 extends _i1.SmartFake implements Uri {
|
||||
_FakeUri_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
_FakeResponse_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i3.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeStreamedResponse_4(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [WgerBaseProvider].
|
||||
@@ -92,10 +63,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i2.AuthProvider get auth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#auth),
|
||||
returnValue: _FakeAuthProvider_0(
|
||||
this,
|
||||
Invocation.getter(#auth),
|
||||
),
|
||||
returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)),
|
||||
)
|
||||
as _i2.AuthProvider);
|
||||
|
||||
@@ -103,70 +71,40 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i3.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_1(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_1(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#auth,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
returnValue: _FakeUri_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -175,10 +113,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<dynamic> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
)
|
||||
as _i5.Future<dynamic>);
|
||||
@@ -186,72 +121,33 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
String? url,
|
||||
int? id,
|
||||
) =>
|
||||
_i5.Future<_i3.Response> deleteRequest(String? url, int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.Response>);
|
||||
@@ -267,134 +163,71 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
|
||||
@override
|
||||
Map<String, String> get metadata =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#metadata),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#metadata), returnValue: <String, String>{})
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
_i2.AuthState get state =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#state),
|
||||
returnValue: _i2.AuthState.updateRequired,
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#state), returnValue: _i2.AuthState.updateRequired)
|
||||
as _i2.AuthState);
|
||||
|
||||
@override
|
||||
_i3.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_1(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_1(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
bool get dataInit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#dataInit),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
bool get isAuth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#isAuth),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
set token(String? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#token,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set token(String? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#token, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set serverUrl(String? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#serverUrl,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set serverUrl(String? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#serverUrl, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set serverVersion(String? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#serverVersion,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set serverVersion(String? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#serverVersion, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set applicationVersion(_i6.PackageInfo? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
value,
|
||||
),
|
||||
Invocation.setter(#applicationVersion, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set metadata(Map<String, String>? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#metadata,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set metadata(Map<String, String>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#metadata, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set state(_i2.AuthState? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#state,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set state(_i2.AuthState? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#state, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set dataInit(bool? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#dataInit,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set dataInit(bool? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#dataInit, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
_i5.Future<void> setServerVersion() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setServerVersion,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#setServerVersion, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -403,10 +236,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
@override
|
||||
_i5.Future<void> setApplicationVersion() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setApplicationVersion,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#setApplicationVersion, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -415,10 +245,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
@override
|
||||
_i5.Future<void> initVersions(String? serverUrl) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initVersions,
|
||||
[serverUrl],
|
||||
),
|
||||
Invocation.method(#initVersions, [serverUrl]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -427,10 +254,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
@override
|
||||
_i5.Future<bool> applicationUpdateRequired([String? version]) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#applicationUpdateRequired,
|
||||
[version],
|
||||
),
|
||||
Invocation.method(#applicationUpdateRequired, [version]),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i5.Future<bool>);
|
||||
@@ -444,17 +268,13 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
String? locale = 'en',
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#register,
|
||||
[],
|
||||
{
|
||||
#username: username,
|
||||
#password: password,
|
||||
#email: email,
|
||||
#serverUrl: serverUrl,
|
||||
#locale: locale,
|
||||
},
|
||||
),
|
||||
Invocation.method(#register, [], {
|
||||
#username: username,
|
||||
#password: password,
|
||||
#email: email,
|
||||
#serverUrl: serverUrl,
|
||||
#locale: locale,
|
||||
}),
|
||||
returnValue: _i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update),
|
||||
)
|
||||
as _i5.Future<_i2.LoginActions>);
|
||||
@@ -467,15 +287,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
String? apiToken,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#login,
|
||||
[
|
||||
username,
|
||||
password,
|
||||
serverUrl,
|
||||
apiToken,
|
||||
],
|
||||
),
|
||||
Invocation.method(#login, [username, password, serverUrl, apiToken]),
|
||||
returnValue: _i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update),
|
||||
)
|
||||
as _i5.Future<_i2.LoginActions>);
|
||||
@@ -483,18 +295,9 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
@override
|
||||
_i5.Future<String> getServerUrlFromPrefs() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerUrlFromPrefs,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#getServerUrlFromPrefs, []),
|
||||
returnValue: _i5.Future<String>.value(
|
||||
_i7.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getServerUrlFromPrefs,
|
||||
[],
|
||||
),
|
||||
),
|
||||
_i7.dummyValue<String>(this, Invocation.method(#getServerUrlFromPrefs, [])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<String>);
|
||||
@@ -502,10 +305,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
@override
|
||||
_i5.Future<void> tryAutoLogin() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#tryAutoLogin,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#tryAutoLogin, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -514,11 +314,7 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
@override
|
||||
_i5.Future<void> logout({bool? shouldNotify = true}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logout,
|
||||
[],
|
||||
{#shouldNotify: shouldNotify},
|
||||
),
|
||||
Invocation.method(#logout, [], {#shouldNotify: shouldNotify}),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -527,55 +323,30 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider {
|
||||
@override
|
||||
String getAppNameHeader() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAppNameHeader,
|
||||
[],
|
||||
),
|
||||
returnValue: _i7.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getAppNameHeader,
|
||||
[],
|
||||
),
|
||||
),
|
||||
Invocation.method(#getAppNameHeader, []),
|
||||
returnValue: _i7.dummyValue<String>(this, Invocation.method(#getAppNameHeader, [])),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
/// A class which mocks [Client].
|
||||
@@ -587,49 +358,21 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.Response> head(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i5.Future<_i3.Response> head(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#head,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#head, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#head,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#head, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.Response>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.Response> get(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i5.Future<_i3.Response> get(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#get,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#get, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#get,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#get, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.Response>);
|
||||
@@ -642,26 +385,14 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
_i9.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#post,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -676,26 +407,14 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
_i9.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#put,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#put,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -710,26 +429,14 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
_i9.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -747,11 +454,7 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
@@ -759,11 +462,7 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -771,40 +470,19 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
as _i5.Future<_i3.Response>);
|
||||
|
||||
@override
|
||||
_i5.Future<String> read(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i5.Future<String> read(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<String>.value(
|
||||
_i7.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_i7.dummyValue<String>(this, Invocation.method(#read, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i5.Future<String>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i10.Uint8List> readBytes(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i5.Future<_i10.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#readBytes,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#readBytes, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)),
|
||||
)
|
||||
as _i5.Future<_i10.Uint8List>);
|
||||
@@ -812,28 +490,14 @@ class MockClient extends _i1.Mock implements _i3.Client {
|
||||
@override
|
||||
_i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
Invocation.method(#send, [request]),
|
||||
returnValue: _i5.Future<_i3.StreamedResponse>.value(
|
||||
_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
),
|
||||
_FakeStreamedResponse_4(this, Invocation.method(#send, [request])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.StreamedResponse>);
|
||||
|
||||
@override
|
||||
void close() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#close,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void close() =>
|
||||
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -31,53 +31,24 @@ import 'package:wger/providers/base_provider.dart' as _i8;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeClient_0 extends _i1.SmartFake implements _i2.Client {
|
||||
_FakeClient_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeClient_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeAuthProvider_1 extends _i1.SmartFake implements _i3.AuthProvider {
|
||||
_FakeAuthProvider_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeAuthProvider_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeUri_2 extends _i1.SmartFake implements Uri {
|
||||
_FakeUri_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeResponse_3 extends _i1.SmartFake implements _i2.Response {
|
||||
_FakeResponse_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_4 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeStreamedResponse_4(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [AuthProvider].
|
||||
@@ -90,134 +61,71 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
|
||||
@override
|
||||
Map<String, String> get metadata =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#metadata),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#metadata), returnValue: <String, String>{})
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
_i3.AuthState get state =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#state),
|
||||
returnValue: _i3.AuthState.updateRequired,
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#state), returnValue: _i3.AuthState.updateRequired)
|
||||
as _i3.AuthState);
|
||||
|
||||
@override
|
||||
_i2.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_0(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_0(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i2.Client);
|
||||
|
||||
@override
|
||||
bool get dataInit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#dataInit),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
bool get isAuth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#isAuth),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
set token(String? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#token,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set token(String? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#token, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set serverUrl(String? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#serverUrl,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set serverUrl(String? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#serverUrl, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set serverVersion(String? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#serverVersion,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set serverVersion(String? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#serverVersion, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set applicationVersion(_i4.PackageInfo? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#applicationVersion,
|
||||
value,
|
||||
),
|
||||
Invocation.setter(#applicationVersion, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set metadata(Map<String, String>? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#metadata,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set metadata(Map<String, String>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#metadata, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set state(_i3.AuthState? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#state,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set state(_i3.AuthState? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#state, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i2.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i2.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set dataInit(bool? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#dataInit,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set dataInit(bool? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#dataInit, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
_i5.Future<void> setServerVersion() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setServerVersion,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#setServerVersion, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -226,10 +134,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
@override
|
||||
_i5.Future<void> setApplicationVersion() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setApplicationVersion,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#setApplicationVersion, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -238,10 +143,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
@override
|
||||
_i5.Future<void> initVersions(String? serverUrl) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initVersions,
|
||||
[serverUrl],
|
||||
),
|
||||
Invocation.method(#initVersions, [serverUrl]),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -250,10 +152,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
@override
|
||||
_i5.Future<bool> applicationUpdateRequired([String? version]) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#applicationUpdateRequired,
|
||||
[version],
|
||||
),
|
||||
Invocation.method(#applicationUpdateRequired, [version]),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
)
|
||||
as _i5.Future<bool>);
|
||||
@@ -267,17 +166,13 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
String? locale = 'en',
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#register,
|
||||
[],
|
||||
{
|
||||
#username: username,
|
||||
#password: password,
|
||||
#email: email,
|
||||
#serverUrl: serverUrl,
|
||||
#locale: locale,
|
||||
},
|
||||
),
|
||||
Invocation.method(#register, [], {
|
||||
#username: username,
|
||||
#password: password,
|
||||
#email: email,
|
||||
#serverUrl: serverUrl,
|
||||
#locale: locale,
|
||||
}),
|
||||
returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update),
|
||||
)
|
||||
as _i5.Future<_i3.LoginActions>);
|
||||
@@ -290,15 +185,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
String? apiToken,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#login,
|
||||
[
|
||||
username,
|
||||
password,
|
||||
serverUrl,
|
||||
apiToken,
|
||||
],
|
||||
),
|
||||
Invocation.method(#login, [username, password, serverUrl, apiToken]),
|
||||
returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update),
|
||||
)
|
||||
as _i5.Future<_i3.LoginActions>);
|
||||
@@ -306,18 +193,9 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
@override
|
||||
_i5.Future<String> getServerUrlFromPrefs() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerUrlFromPrefs,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#getServerUrlFromPrefs, []),
|
||||
returnValue: _i5.Future<String>.value(
|
||||
_i6.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getServerUrlFromPrefs,
|
||||
[],
|
||||
),
|
||||
),
|
||||
_i6.dummyValue<String>(this, Invocation.method(#getServerUrlFromPrefs, [])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<String>);
|
||||
@@ -325,10 +203,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
@override
|
||||
_i5.Future<void> tryAutoLogin() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#tryAutoLogin,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#tryAutoLogin, []),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -337,11 +212,7 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
@override
|
||||
_i5.Future<void> logout({bool? shouldNotify = true}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logout,
|
||||
[],
|
||||
{#shouldNotify: shouldNotify},
|
||||
),
|
||||
Invocation.method(#logout, [], {#shouldNotify: shouldNotify}),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
)
|
||||
@@ -350,55 +221,30 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider {
|
||||
@override
|
||||
String getAppNameHeader() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAppNameHeader,
|
||||
[],
|
||||
),
|
||||
returnValue: _i6.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#getAppNameHeader,
|
||||
[],
|
||||
),
|
||||
),
|
||||
Invocation.method(#getAppNameHeader, []),
|
||||
returnValue: _i6.dummyValue<String>(this, Invocation.method(#getAppNameHeader, [])),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
void addListener(_i7.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
/// A class which mocks [WgerBaseProvider].
|
||||
@@ -413,10 +259,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
_i3.AuthProvider get auth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#auth),
|
||||
returnValue: _FakeAuthProvider_1(
|
||||
this,
|
||||
Invocation.getter(#auth),
|
||||
),
|
||||
returnValue: _FakeAuthProvider_1(this, Invocation.getter(#auth)),
|
||||
)
|
||||
as _i3.AuthProvider);
|
||||
|
||||
@@ -424,70 +267,40 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
_i2.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_0(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_0(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i2.Client);
|
||||
|
||||
@override
|
||||
set auth(_i3.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#auth,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set auth(_i3.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i2.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i2.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
returnValue: _FakeUri_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -496,10 +309,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<dynamic> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
)
|
||||
as _i5.Future<dynamic>);
|
||||
@@ -507,72 +317,33 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.Response> deleteRequest(
|
||||
String? url,
|
||||
int? id,
|
||||
) =>
|
||||
_i5.Future<_i2.Response> deleteRequest(String? url, int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i2.Response>);
|
||||
@@ -587,49 +358,21 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
}
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.Response> head(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i5.Future<_i2.Response> head(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#head,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#head, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#head,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#head, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i2.Response> get(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i5.Future<_i2.Response> get(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#get,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#get, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#get,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#get, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i2.Response>);
|
||||
@@ -642,26 +385,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i9.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#post,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -676,26 +407,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i9.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#put,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#put,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -710,26 +429,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i9.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -747,11 +454,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Response>.value(
|
||||
_FakeResponse_3(
|
||||
@@ -759,11 +462,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -771,40 +470,19 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
as _i5.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i5.Future<String> read(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i5.Future<String> read(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<String>.value(
|
||||
_i6.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_i6.dummyValue<String>(this, Invocation.method(#read, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i5.Future<String>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i10.Uint8List> readBytes(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i5.Future<_i10.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#readBytes,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#readBytes, [url], {#headers: headers}),
|
||||
returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)),
|
||||
)
|
||||
as _i5.Future<_i10.Uint8List>);
|
||||
@@ -812,28 +490,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
@override
|
||||
_i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
Invocation.method(#send, [request]),
|
||||
returnValue: _i5.Future<_i2.StreamedResponse>.value(
|
||||
_FakeStreamedResponse_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
),
|
||||
_FakeStreamedResponse_4(this, Invocation.method(#send, [request])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i2.StreamedResponse>);
|
||||
|
||||
@override
|
||||
void close() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#close,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void close() =>
|
||||
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -27,23 +27,12 @@ import 'package:mockito/src/dummies.dart' as _i5;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
|
||||
_FakeResponse_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse {
|
||||
_FakeStreamedResponse_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeStreamedResponse_1(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [Client].
|
||||
@@ -55,49 +44,21 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
}
|
||||
|
||||
@override
|
||||
_i3.Future<_i2.Response> head(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i3.Future<_i2.Response> head(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#head,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#head, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#head,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_FakeResponse_0(this, Invocation.method(#head, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i3.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i3.Future<_i2.Response> get(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i3.Future<_i2.Response> get(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#get,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#get, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#get,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_FakeResponse_0(this, Invocation.method(#get, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i3.Future<_i2.Response>);
|
||||
@@ -110,26 +71,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i4.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#post, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#post,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -144,26 +93,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i4.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#put,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#put, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#put,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -178,26 +115,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
_i4.Encoding? encoding,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
),
|
||||
Invocation.method(#patch, [url], {#headers: headers, #body: body, #encoding: encoding}),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -215,11 +140,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
returnValue: _i3.Future<_i2.Response>.value(
|
||||
_FakeResponse_0(
|
||||
@@ -227,11 +148,7 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[url],
|
||||
{
|
||||
#headers: headers,
|
||||
#body: body,
|
||||
#encoding: encoding,
|
||||
},
|
||||
{#headers: headers, #body: body, #encoding: encoding},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -239,40 +156,19 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
as _i3.Future<_i2.Response>);
|
||||
|
||||
@override
|
||||
_i3.Future<String> read(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i3.Future<String> read(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#read, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<String>.value(
|
||||
_i5.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(
|
||||
#read,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
),
|
||||
_i5.dummyValue<String>(this, Invocation.method(#read, [url], {#headers: headers})),
|
||||
),
|
||||
)
|
||||
as _i3.Future<String>);
|
||||
|
||||
@override
|
||||
_i3.Future<_i6.Uint8List> readBytes(
|
||||
Uri? url, {
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
_i3.Future<_i6.Uint8List> readBytes(Uri? url, {Map<String, String>? headers}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#readBytes,
|
||||
[url],
|
||||
{#headers: headers},
|
||||
),
|
||||
Invocation.method(#readBytes, [url], {#headers: headers}),
|
||||
returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
|
||||
)
|
||||
as _i3.Future<_i6.Uint8List>);
|
||||
@@ -280,28 +176,14 @@ class MockClient extends _i1.Mock implements _i2.Client {
|
||||
@override
|
||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
Invocation.method(#send, [request]),
|
||||
returnValue: _i3.Future<_i2.StreamedResponse>.value(
|
||||
_FakeStreamedResponse_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#send,
|
||||
[request],
|
||||
),
|
||||
),
|
||||
_FakeStreamedResponse_1(this, Invocation.method(#send, [request])),
|
||||
),
|
||||
)
|
||||
as _i3.Future<_i2.StreamedResponse>);
|
||||
|
||||
@override
|
||||
void close() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#close,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void close() =>
|
||||
super.noSuchMethod(Invocation.method(#close, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -47,9 +47,7 @@ void main() {
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
home: Scaffold(
|
||||
body: SingleChildScrollView(
|
||||
child: DayFormWidget(routineId: 125, day: getTestRoutine().days[0]),
|
||||
),
|
||||
body: SingleChildScrollView(child: DayFormWidget(day: getTestRoutine().days[0])),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -87,6 +85,11 @@ void main() {
|
||||
await tester.enterText(descriptionField, '');
|
||||
await tester.enterText(descriptionField, 'Day 1 description');
|
||||
|
||||
await tester.tap(find.byKey(const Key('field-day-type')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(const Key('day-type-option-hiit')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.tap(find.byKey(const Key(SUBMIT_BUTTON_KEY_NAME)));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -94,10 +97,11 @@ void main() {
|
||||
mockRoutinesProvider.editDay(
|
||||
argThat(
|
||||
isA<Day>()
|
||||
.having((d) => d.routineId, 'routineId', 125)
|
||||
.having((d) => d.routineId, 'routineId', 1)
|
||||
.having((d) => d.id, 'id', 1)
|
||||
.having((d) => d.name, 'name', 'Day 1')
|
||||
.having((d) => d.description, 'description', 'Day 1 description'),
|
||||
.having((d) => d.description, 'description', 'Day 1 description')
|
||||
.having((d) => d.type, 'type', DayType.hiit),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -155,23 +155,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(#auth, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(#client, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
@@ -206,18 +217,28 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
as _i20.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i20.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i20.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i20.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i20.Future<Map<String, dynamic>>);
|
||||
|
||||
@@ -226,7 +247,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i20.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i3.Response>);
|
||||
@@ -244,7 +268,10 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
_i4.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_4(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_4(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i4.WgerBaseProvider);
|
||||
|
||||
@@ -252,18 +279,27 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
_i5.ExerciseDatabase get database =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#database),
|
||||
returnValue: _FakeExerciseDatabase_5(this, Invocation.getter(#database)),
|
||||
returnValue: _FakeExerciseDatabase_5(
|
||||
this,
|
||||
Invocation.getter(#database),
|
||||
),
|
||||
)
|
||||
as _i5.ExerciseDatabase);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> get exercises =>
|
||||
(super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i6.Exercise>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#exercises),
|
||||
returnValue: <_i6.Exercise>[],
|
||||
)
|
||||
as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> get filteredExercises =>
|
||||
(super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#filteredExercises),
|
||||
returnValue: <_i6.Exercise>[],
|
||||
)
|
||||
as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
@@ -276,31 +312,47 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
|
||||
@override
|
||||
List<_i7.ExerciseCategory> get categories =>
|
||||
(super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i7.ExerciseCategory>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#categories),
|
||||
returnValue: <_i7.ExerciseCategory>[],
|
||||
)
|
||||
as List<_i7.ExerciseCategory>);
|
||||
|
||||
@override
|
||||
List<_i9.Muscle> get muscles =>
|
||||
(super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i9.Muscle>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#muscles),
|
||||
returnValue: <_i9.Muscle>[],
|
||||
)
|
||||
as List<_i9.Muscle>);
|
||||
|
||||
@override
|
||||
List<_i8.Equipment> get equipment =>
|
||||
(super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#equipment),
|
||||
returnValue: <_i8.Equipment>[],
|
||||
)
|
||||
as List<_i8.Equipment>);
|
||||
|
||||
@override
|
||||
List<_i10.Language> get languages =>
|
||||
(super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i10.Language>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#languages),
|
||||
returnValue: <_i10.Language>[],
|
||||
)
|
||||
as List<_i10.Language>);
|
||||
|
||||
@override
|
||||
set database(_i5.ExerciseDatabase? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
|
||||
set database(_i5.ExerciseDatabase? value) => super.noSuchMethod(
|
||||
Invocation.setter(#database, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set exercises(List<_i6.Exercise>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null);
|
||||
set exercises(List<_i6.Exercise>? value) => super.noSuchMethod(
|
||||
Invocation.setter(#exercises, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
@@ -309,8 +361,10 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set languages(List<_i10.Language>? languages) =>
|
||||
super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null);
|
||||
set languages(List<_i10.Language>? languages) => super.noSuchMethod(
|
||||
Invocation.setter(#languages, languages),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
@@ -326,8 +380,10 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
as _i20.Future<void>);
|
||||
|
||||
@override
|
||||
void initFilters() =>
|
||||
super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null);
|
||||
void initFilters() => super.noSuchMethod(
|
||||
Invocation.method(#initFilters, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i20.Future<void> findByFilters() =>
|
||||
@@ -339,19 +395,27 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
as _i20.Future<void>);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i6.Exercise findExerciseById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findExerciseById, [id]),
|
||||
returnValue: _FakeExercise_6(this, Invocation.method(#findExerciseById, [id])),
|
||||
returnValue: _FakeExercise_6(
|
||||
this,
|
||||
Invocation.method(#findExerciseById, [id]),
|
||||
),
|
||||
)
|
||||
as _i6.Exercise);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) =>
|
||||
List<_i6.Exercise> findExercisesByVariationId(
|
||||
int? variationId, {
|
||||
int? exerciseIdToExclude,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findExercisesByVariationId,
|
||||
@@ -366,7 +430,10 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
_i7.ExerciseCategory findCategoryById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findCategoryById, [id]),
|
||||
returnValue: _FakeExerciseCategory_7(this, Invocation.method(#findCategoryById, [id])),
|
||||
returnValue: _FakeExerciseCategory_7(
|
||||
this,
|
||||
Invocation.method(#findCategoryById, [id]),
|
||||
),
|
||||
)
|
||||
as _i7.ExerciseCategory);
|
||||
|
||||
@@ -374,7 +441,10 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
_i8.Equipment findEquipmentById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findEquipmentById, [id]),
|
||||
returnValue: _FakeEquipment_8(this, Invocation.method(#findEquipmentById, [id])),
|
||||
returnValue: _FakeEquipment_8(
|
||||
this,
|
||||
Invocation.method(#findEquipmentById, [id]),
|
||||
),
|
||||
)
|
||||
as _i8.Equipment);
|
||||
|
||||
@@ -382,7 +452,10 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
_i9.Muscle findMuscleById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findMuscleById, [id]),
|
||||
returnValue: _FakeMuscle_9(this, Invocation.method(#findMuscleById, [id])),
|
||||
returnValue: _FakeMuscle_9(
|
||||
this,
|
||||
Invocation.method(#findMuscleById, [id]),
|
||||
),
|
||||
)
|
||||
as _i9.Muscle);
|
||||
|
||||
@@ -390,7 +463,10 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
_i10.Language findLanguageById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findLanguageById, [id]),
|
||||
returnValue: _FakeLanguage_10(this, Invocation.method(#findLanguageById, [id])),
|
||||
returnValue: _FakeLanguage_10(
|
||||
this,
|
||||
Invocation.method(#findLanguageById, [id]),
|
||||
),
|
||||
)
|
||||
as _i10.Language);
|
||||
|
||||
@@ -453,11 +529,17 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
int? exerciseId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [
|
||||
database,
|
||||
exerciseId,
|
||||
]),
|
||||
returnValue: _i20.Future<_i6.Exercise>.value(
|
||||
_FakeExercise_6(
|
||||
this,
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [
|
||||
database,
|
||||
exerciseId,
|
||||
]),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -466,7 +548,9 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
@override
|
||||
_i20.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}),
|
||||
Invocation.method(#initCacheTimesLocalPrefs, [], {
|
||||
#forceInit: forceInit,
|
||||
}),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
)
|
||||
@@ -563,7 +647,9 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
[name],
|
||||
{#languageCode: languageCode, #searchEnglish: searchEnglish},
|
||||
),
|
||||
returnValue: _i20.Future<List<_i6.Exercise>>.value(<_i6.Exercise>[]),
|
||||
returnValue: _i20.Future<List<_i6.Exercise>>.value(
|
||||
<_i6.Exercise>[],
|
||||
),
|
||||
)
|
||||
as _i20.Future<List<_i6.Exercise>>);
|
||||
|
||||
@@ -580,12 +666,16 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
@@ -600,44 +690,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
_i4.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_4(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_4(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i4.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i13.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i13.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i13.Routine>[],
|
||||
)
|
||||
as List<_i13.Routine>);
|
||||
|
||||
@override
|
||||
List<_i11.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i11.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i11.WeightUnit>[],
|
||||
)
|
||||
as List<_i11.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i11.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_11(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_11(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i11.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i12.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i12.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i12.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i12.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i12.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_12(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_12(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i12.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i13.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i13.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i11.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -656,14 +766,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i11.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_11(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_11(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i11.WeightUnit);
|
||||
|
||||
@@ -680,20 +795,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i13.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i13.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i13.Routine>[],
|
||||
)
|
||||
as List<_i13.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_13(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_13(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i13.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -719,7 +844,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
Map<int, _i6.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
)
|
||||
@@ -730,7 +859,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i20.Future<_i13.Routine>.value(
|
||||
_FakeRoutine_13(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_13(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i13.Routine>);
|
||||
@@ -740,7 +872,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i20.Future<_i13.Routine>.value(
|
||||
_FakeRoutine_13(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_13(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i13.Routine>);
|
||||
@@ -842,7 +977,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i20.Future<_i15.Slot>.value(
|
||||
_FakeSlot_15(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
_FakeSlot_15(
|
||||
this,
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i15.Slot>);
|
||||
@@ -875,11 +1013,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
as _i20.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i16.SlotEntry> addSlotEntry(_i16.SlotEntry? entry, int? routineId) =>
|
||||
_i20.Future<_i16.SlotEntry> addSlotEntry(
|
||||
_i16.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i20.Future<_i16.SlotEntry>.value(
|
||||
_FakeSlotEntry_16(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_16(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i16.SlotEntry>);
|
||||
@@ -906,26 +1050,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
String getConfigUrl(_i16.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i25.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i25.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i20.Future<_i17.BaseConfig> editConfig(_i17.BaseConfig? config, _i16.ConfigType? type) =>
|
||||
_i20.Future<_i17.BaseConfig> editConfig(
|
||||
_i17.BaseConfig? config,
|
||||
_i16.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i20.Future<_i17.BaseConfig>.value(
|
||||
_FakeBaseConfig_17(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_17(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i17.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i17.BaseConfig> addConfig(_i17.BaseConfig? config, _i16.ConfigType? type) =>
|
||||
_i20.Future<_i17.BaseConfig> addConfig(
|
||||
_i17.BaseConfig? config,
|
||||
_i16.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i20.Future<_i17.BaseConfig>.value(
|
||||
_FakeBaseConfig_17(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_17(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i17.BaseConfig>);
|
||||
@@ -940,7 +1099,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
as _i20.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> handleConfig(_i16.SlotEntry? entry, num? value, _i16.ConfigType? type) =>
|
||||
_i20.Future<void> handleConfig(
|
||||
_i16.SlotEntry? entry,
|
||||
num? value,
|
||||
_i16.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
@@ -952,16 +1115,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
_i20.Future<List<_i18.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i20.Future<List<_i18.WorkoutSession>>.value(<_i18.WorkoutSession>[]),
|
||||
returnValue: _i20.Future<List<_i18.WorkoutSession>>.value(
|
||||
<_i18.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i20.Future<List<_i18.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i18.WorkoutSession> addSession(_i18.WorkoutSession? session, int? routineId) =>
|
||||
_i20.Future<_i18.WorkoutSession> addSession(
|
||||
_i18.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i20.Future<_i18.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_18(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_18(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i18.WorkoutSession>);
|
||||
@@ -971,7 +1142,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i20.Future<_i18.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_18(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_18(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i18.WorkoutSession>);
|
||||
@@ -1008,10 +1182,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,8 +41,6 @@ void main() {
|
||||
|
||||
final slotEntry = SlotEntry(
|
||||
slotId: 1,
|
||||
type: 'normal',
|
||||
order: 1,
|
||||
exerciseId: 1,
|
||||
repetitionUnitId: 1,
|
||||
repetitionRounding: 0.25,
|
||||
@@ -70,9 +68,7 @@ void main() {
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
navigatorKey: key,
|
||||
home: Scaffold(body: RepetitionUnitInputWidget(1, onChanged: (value) => result = value)),
|
||||
routes: {
|
||||
RoutineScreen.routeName: (ctx) => const RoutineScreen(),
|
||||
},
|
||||
routes: {RoutineScreen.routeName: (ctx) => const RoutineScreen()},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -66,23 +66,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(#auth, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(#client, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
@@ -120,15 +131,22 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#post, [data, 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(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@@ -137,7 +155,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.Response>);
|
||||
|
||||
@@ -105,23 +105,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(#auth, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(#client, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
@@ -156,18 +167,28 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
as _i11.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i11.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i11.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i11.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i11.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i11.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i11.Future<Map<String, dynamic>>);
|
||||
|
||||
@@ -176,7 +197,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i11.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i11.Future<_i3.Response>);
|
||||
@@ -194,7 +218,10 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
_i4.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_4(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_4(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i4.WgerBaseProvider);
|
||||
|
||||
@@ -202,18 +229,27 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
_i5.ExerciseDatabase get database =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#database),
|
||||
returnValue: _FakeExerciseDatabase_5(this, Invocation.getter(#database)),
|
||||
returnValue: _FakeExerciseDatabase_5(
|
||||
this,
|
||||
Invocation.getter(#database),
|
||||
),
|
||||
)
|
||||
as _i5.ExerciseDatabase);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> get exercises =>
|
||||
(super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i6.Exercise>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#exercises),
|
||||
returnValue: <_i6.Exercise>[],
|
||||
)
|
||||
as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> get filteredExercises =>
|
||||
(super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#filteredExercises),
|
||||
returnValue: <_i6.Exercise>[],
|
||||
)
|
||||
as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
@@ -226,31 +262,47 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
|
||||
@override
|
||||
List<_i7.ExerciseCategory> get categories =>
|
||||
(super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i7.ExerciseCategory>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#categories),
|
||||
returnValue: <_i7.ExerciseCategory>[],
|
||||
)
|
||||
as List<_i7.ExerciseCategory>);
|
||||
|
||||
@override
|
||||
List<_i9.Muscle> get muscles =>
|
||||
(super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i9.Muscle>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#muscles),
|
||||
returnValue: <_i9.Muscle>[],
|
||||
)
|
||||
as List<_i9.Muscle>);
|
||||
|
||||
@override
|
||||
List<_i8.Equipment> get equipment =>
|
||||
(super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#equipment),
|
||||
returnValue: <_i8.Equipment>[],
|
||||
)
|
||||
as List<_i8.Equipment>);
|
||||
|
||||
@override
|
||||
List<_i10.Language> get languages =>
|
||||
(super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i10.Language>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#languages),
|
||||
returnValue: <_i10.Language>[],
|
||||
)
|
||||
as List<_i10.Language>);
|
||||
|
||||
@override
|
||||
set database(_i5.ExerciseDatabase? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
|
||||
set database(_i5.ExerciseDatabase? value) => super.noSuchMethod(
|
||||
Invocation.setter(#database, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set exercises(List<_i6.Exercise>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null);
|
||||
set exercises(List<_i6.Exercise>? value) => super.noSuchMethod(
|
||||
Invocation.setter(#exercises, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
@@ -259,8 +311,10 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
set languages(List<_i10.Language>? languages) =>
|
||||
super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null);
|
||||
set languages(List<_i10.Language>? languages) => super.noSuchMethod(
|
||||
Invocation.setter(#languages, languages),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
@@ -276,8 +330,10 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
void initFilters() =>
|
||||
super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null);
|
||||
void initFilters() => super.noSuchMethod(
|
||||
Invocation.method(#initFilters, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i11.Future<void> findByFilters() =>
|
||||
@@ -289,19 +345,27 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i6.Exercise findExerciseById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findExerciseById, [id]),
|
||||
returnValue: _FakeExercise_6(this, Invocation.method(#findExerciseById, [id])),
|
||||
returnValue: _FakeExercise_6(
|
||||
this,
|
||||
Invocation.method(#findExerciseById, [id]),
|
||||
),
|
||||
)
|
||||
as _i6.Exercise);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) =>
|
||||
List<_i6.Exercise> findExercisesByVariationId(
|
||||
int? variationId, {
|
||||
int? exerciseIdToExclude,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findExercisesByVariationId,
|
||||
@@ -316,7 +380,10 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
_i7.ExerciseCategory findCategoryById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findCategoryById, [id]),
|
||||
returnValue: _FakeExerciseCategory_7(this, Invocation.method(#findCategoryById, [id])),
|
||||
returnValue: _FakeExerciseCategory_7(
|
||||
this,
|
||||
Invocation.method(#findCategoryById, [id]),
|
||||
),
|
||||
)
|
||||
as _i7.ExerciseCategory);
|
||||
|
||||
@@ -324,7 +391,10 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
_i8.Equipment findEquipmentById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findEquipmentById, [id]),
|
||||
returnValue: _FakeEquipment_8(this, Invocation.method(#findEquipmentById, [id])),
|
||||
returnValue: _FakeEquipment_8(
|
||||
this,
|
||||
Invocation.method(#findEquipmentById, [id]),
|
||||
),
|
||||
)
|
||||
as _i8.Equipment);
|
||||
|
||||
@@ -332,7 +402,10 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
_i9.Muscle findMuscleById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findMuscleById, [id]),
|
||||
returnValue: _FakeMuscle_9(this, Invocation.method(#findMuscleById, [id])),
|
||||
returnValue: _FakeMuscle_9(
|
||||
this,
|
||||
Invocation.method(#findMuscleById, [id]),
|
||||
),
|
||||
)
|
||||
as _i9.Muscle);
|
||||
|
||||
@@ -340,7 +413,10 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
_i10.Language findLanguageById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findLanguageById, [id]),
|
||||
returnValue: _FakeLanguage_10(this, Invocation.method(#findLanguageById, [id])),
|
||||
returnValue: _FakeLanguage_10(
|
||||
this,
|
||||
Invocation.method(#findLanguageById, [id]),
|
||||
),
|
||||
)
|
||||
as _i10.Language);
|
||||
|
||||
@@ -403,11 +479,17 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
int? exerciseId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [
|
||||
database,
|
||||
exerciseId,
|
||||
]),
|
||||
returnValue: _i11.Future<_i6.Exercise>.value(
|
||||
_FakeExercise_6(
|
||||
this,
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]),
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [
|
||||
database,
|
||||
exerciseId,
|
||||
]),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -416,7 +498,9 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
@override
|
||||
_i11.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}),
|
||||
Invocation.method(#initCacheTimesLocalPrefs, [], {
|
||||
#forceInit: forceInit,
|
||||
}),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -513,7 +597,9 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
[name],
|
||||
{#languageCode: languageCode, #searchEnglish: searchEnglish},
|
||||
),
|
||||
returnValue: _i11.Future<List<_i6.Exercise>>.value(<_i6.Exercise>[]),
|
||||
returnValue: _i11.Future<List<_i6.Exercise>>.value(
|
||||
<_i6.Exercise>[],
|
||||
),
|
||||
)
|
||||
as _i11.Future<List<_i6.Exercise>>);
|
||||
|
||||
@@ -530,10 +616,14 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -66,23 +66,34 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(#auth, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(#client, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
Invocation.method(#getDefaultHeaders, [], {
|
||||
#includeAuth: includeAuth,
|
||||
}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
@@ -120,15 +131,22 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#post, [data, 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(Map<String, dynamic>? data, Uri? uri) =>
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@@ -137,7 +155,10 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.Response>);
|
||||
|
||||
@@ -23,6 +23,7 @@ import 'package:mockito/mockito.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wger/helpers/consts.dart';
|
||||
import 'package:wger/l10n/generated/app_localizations.dart';
|
||||
import 'package:wger/models/workouts/slot_entry.dart';
|
||||
import 'package:wger/providers/routines.dart';
|
||||
import 'package:wger/widgets/routines/forms/reps_unit.dart';
|
||||
import 'package:wger/widgets/routines/forms/rir.dart';
|
||||
@@ -67,6 +68,7 @@ void main() {
|
||||
|
||||
expect(find.byType(TextFormField), findsNWidgets(2));
|
||||
expect(find.byType(Slider), findsOne);
|
||||
expect(find.byType(DropdownButtonFormField), findsNothing);
|
||||
expect(find.byType(WeightUnitInputWidget), findsNothing);
|
||||
expect(find.byType(RepetitionUnitInputWidget), findsNothing);
|
||||
expect(find.byType(RiRInputWidget), findsNothing);
|
||||
@@ -78,18 +80,80 @@ void main() {
|
||||
|
||||
expect(find.byType(TextFormField), findsNWidgets(6));
|
||||
expect(find.byType(Slider), findsNWidgets(2));
|
||||
expect(find.byType(DropdownButtonFormField), findsNothing);
|
||||
expect(find.byType(WeightUnitInputWidget), findsOne);
|
||||
expect(find.byType(RepetitionUnitInputWidget), findsOne);
|
||||
expect(find.byType(RiRInputWidget), findsOne);
|
||||
});
|
||||
|
||||
testWidgets('Correctly updates the values on the server', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(renderWidget(simpleMode: true));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(const Key(SUBMIT_BUTTON_KEY_NAME)));
|
||||
await tester.pumpWidget(renderWidget(simpleMode: false));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
verify(mockRoutinesProvider.editSlotEntry(any, any)).called(1);
|
||||
verify(mockRoutinesProvider.handleConfig(any, any, any)).called(8);
|
||||
// Set weight
|
||||
final weightField = find.byKey(const ValueKey('field-weight'));
|
||||
await tester.enterText(weightField, '100');
|
||||
|
||||
final maxWeightField = find.byKey(const ValueKey('field-max-weight'));
|
||||
await tester.enterText(maxWeightField, '110');
|
||||
|
||||
// Set repetitions
|
||||
final repetitionsField = find.byKey(const ValueKey('field-repetitions'));
|
||||
await tester.enterText(repetitionsField, '10');
|
||||
final maxRepetitionsField = find.byKey(const ValueKey('field-max-repetitions'));
|
||||
await tester.enterText(maxRepetitionsField, '12');
|
||||
|
||||
// Set rest time
|
||||
final restField = find.byKey(const ValueKey('field-rest'));
|
||||
await tester.enterText(restField, '90');
|
||||
final maxRestField = find.byKey(const ValueKey('field-max-rest'));
|
||||
await tester.enterText(maxRestField, '100');
|
||||
|
||||
// Set type
|
||||
await tester.tap(find.byKey(const ValueKey('field-slot-entry-type')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.ensureVisible(find.byKey(const ValueKey('slot-entry-type-option-myo')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(const ValueKey('slot-entry-type-option-myo')), warnIfMissed: false);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.tap(find.byKey(const ValueKey(SUBMIT_BUTTON_KEY_NAME)));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
verify(
|
||||
mockRoutinesProvider.editSlotEntry(
|
||||
argThat(
|
||||
isA<SlotEntry>()
|
||||
.having((d) => d.id, 'id', null)
|
||||
.having((d) => d.slotId, 'slotId', 1)
|
||||
.having((d) => d.order, 'order', 1)
|
||||
.having((d) => d.type, 'type', SlotEntryType.myo),
|
||||
),
|
||||
1,
|
||||
),
|
||||
);
|
||||
|
||||
final verification = verify(
|
||||
mockRoutinesProvider.handleConfig(captureAny, captureAny, captureAny),
|
||||
);
|
||||
final capturedArgs = verification.captured; // List with 8*3 arguments (3 per call)
|
||||
|
||||
expect(capturedArgs[(0 * 3) + 1], 4);
|
||||
expect(capturedArgs[(0 * 3) + 2], ConfigType.sets);
|
||||
|
||||
expect(capturedArgs[(1 * 3) + 1], 100);
|
||||
expect(capturedArgs[(1 * 3) + 2], ConfigType.weight);
|
||||
expect(capturedArgs[(2 * 3) + 1], 110);
|
||||
expect(capturedArgs[(2 * 3) + 2], ConfigType.maxWeight);
|
||||
|
||||
expect(capturedArgs[(3 * 3) + 1], 10);
|
||||
expect(capturedArgs[(3 * 3) + 2], ConfigType.repetitions);
|
||||
expect(capturedArgs[(4 * 3) + 1], 12);
|
||||
expect(capturedArgs[(4 * 3) + 2], ConfigType.maxRepetitions);
|
||||
|
||||
expect(capturedArgs[(5 * 3) + 1], 90);
|
||||
expect(capturedArgs[(5 * 3) + 2], ConfigType.rest);
|
||||
expect(capturedArgs[(6 * 3) + 1], 100);
|
||||
expect(capturedArgs[(6 * 3) + 2], ConfigType.maxRest);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,8 +41,6 @@ void main() {
|
||||
|
||||
final slotEntry = SlotEntry(
|
||||
slotId: 1,
|
||||
type: 'normal',
|
||||
order: 1,
|
||||
exerciseId: 1,
|
||||
repetitionUnitId: 1,
|
||||
repetitionRounding: 0.25,
|
||||
|
||||
@@ -92,44 +92,64 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i5.Routine> get items =>
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
List<_i3.WeightUnit> get weightUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#weightUnits), returnValue: <_i3.WeightUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#weightUnits),
|
||||
returnValue: <_i3.WeightUnit>[],
|
||||
)
|
||||
as List<_i3.WeightUnit>);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit get defaultWeightUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.getter(#defaultWeightUnit)),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.getter(#defaultWeightUnit),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@override
|
||||
List<_i4.RepetitionUnit> get repetitionUnits =>
|
||||
(super.noSuchMethod(Invocation.getter(#repetitionUnits), returnValue: <_i4.RepetitionUnit>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#repetitionUnits),
|
||||
returnValue: <_i4.RepetitionUnit>[],
|
||||
)
|
||||
as List<_i4.RepetitionUnit>);
|
||||
|
||||
@override
|
||||
_i4.RepetitionUnit get defaultRepetitionUnit =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
returnValue: _FakeRepetitionUnit_2(this, Invocation.getter(#defaultRepetitionUnit)),
|
||||
returnValue: _FakeRepetitionUnit_2(
|
||||
this,
|
||||
Invocation.getter(#defaultRepetitionUnit),
|
||||
),
|
||||
)
|
||||
as _i4.RepetitionUnit);
|
||||
|
||||
@override
|
||||
set activeRoutine(_i5.Routine? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#activeRoutine, value), returnValueForMissingStub: null);
|
||||
set activeRoutine(_i5.Routine? value) => super.noSuchMethod(
|
||||
Invocation.setter(#activeRoutine, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod(
|
||||
@@ -148,14 +168,19 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i3.WeightUnit findWeightUnitById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])),
|
||||
returnValue: _FakeWeightUnit_1(
|
||||
this,
|
||||
Invocation.method(#findWeightUnitById, [id]),
|
||||
),
|
||||
)
|
||||
as _i3.WeightUnit);
|
||||
|
||||
@@ -172,20 +197,30 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
|
||||
@override
|
||||
List<_i5.Routine> getPlans() =>
|
||||
(super.noSuchMethod(Invocation.method(#getPlans, []), returnValue: <_i5.Routine>[])
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getPlans, []),
|
||||
returnValue: <_i5.Routine>[],
|
||||
)
|
||||
as List<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i5.Routine findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeRoutine_3(this, Invocation.method(#findById, [id])),
|
||||
returnValue: _FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#findById, [id]),
|
||||
),
|
||||
)
|
||||
as _i5.Routine);
|
||||
|
||||
@override
|
||||
int findIndexById(int? id) =>
|
||||
(super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int);
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findIndexById, [id]),
|
||||
returnValue: 0,
|
||||
)
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
@@ -211,7 +246,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}),
|
||||
Invocation.method(
|
||||
#setExercisesAndUnits,
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
)
|
||||
@@ -222,7 +261,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -232,7 +274,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])),
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
@@ -367,11 +412,17 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(this, Invocation.method(#addSlotEntry, [entry, routineId])),
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
@@ -398,26 +449,41 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(this, Invocation.method(#getConfigUrl, [type])),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#editConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(_i9.BaseConfig? config, _i8.ConfigType? type) =>
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(this, Invocation.method(#addConfig, [config, type])),
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
@@ -432,7 +498,11 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as _i13.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) =>
|
||||
_i13.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
@@ -444,16 +514,24 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(<_i10.WorkoutSession>[]),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session, int? routineId) =>
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#addSession, [session, routineId])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -463,7 +541,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])),
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
@@ -500,10 +581,14 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(#dispose, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(#notifyListeners, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,43 +26,19 @@ import 'package:wger/providers/base_provider.dart' as _i4;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
|
||||
_FakeAuthProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
|
||||
_FakeClient_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeUri_2 extends _i1.SmartFake implements Uri {
|
||||
_FakeUri_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
_FakeResponse_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [WgerBaseProvider].
|
||||
@@ -77,10 +53,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i2.AuthProvider get auth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#auth),
|
||||
returnValue: _FakeAuthProvider_0(
|
||||
this,
|
||||
Invocation.getter(#auth),
|
||||
),
|
||||
returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)),
|
||||
)
|
||||
as _i2.AuthProvider);
|
||||
|
||||
@@ -88,70 +61,40 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i3.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_1(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_1(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#auth,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
returnValue: _FakeUri_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -160,10 +103,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<dynamic> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
)
|
||||
as _i5.Future<dynamic>);
|
||||
@@ -171,72 +111,33 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
String? url,
|
||||
int? id,
|
||||
) =>
|
||||
_i5.Future<_i3.Response> deleteRequest(String? url, int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.Response>);
|
||||
|
||||
@@ -26,43 +26,19 @@ import 'package:wger/providers/base_provider.dart' as _i4;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeAuthProvider_0 extends _i1.SmartFake implements _i2.AuthProvider {
|
||||
_FakeAuthProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeAuthProvider_0(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeClient_1 extends _i1.SmartFake implements _i3.Client {
|
||||
_FakeClient_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeClient_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeUri_2 extends _i1.SmartFake implements Uri {
|
||||
_FakeUri_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeUri_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeResponse_3 extends _i1.SmartFake implements _i3.Response {
|
||||
_FakeResponse_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeResponse_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [WgerBaseProvider].
|
||||
@@ -77,10 +53,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i2.AuthProvider get auth =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#auth),
|
||||
returnValue: _FakeAuthProvider_0(
|
||||
this,
|
||||
Invocation.getter(#auth),
|
||||
),
|
||||
returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)),
|
||||
)
|
||||
as _i2.AuthProvider);
|
||||
|
||||
@@ -88,70 +61,40 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
_i3.Client get client =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_1(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
returnValue: _FakeClient_1(this, Invocation.getter(#client)),
|
||||
)
|
||||
as _i3.Client);
|
||||
|
||||
@override
|
||||
set auth(_i2.AuthProvider? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#auth,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set auth(_i2.AuthProvider? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set client(_i3.Client? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#client,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set client(_i3.Client? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
Map<String, String> getDefaultHeaders({bool? includeAuth = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getDefaultHeaders,
|
||||
[],
|
||||
{#includeAuth: includeAuth},
|
||||
),
|
||||
Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}),
|
||||
returnValue: <String, String>{},
|
||||
)
|
||||
as Map<String, String>);
|
||||
|
||||
@override
|
||||
Uri makeUrl(
|
||||
String? path, {
|
||||
int? id,
|
||||
String? objectMethod,
|
||||
Map<String, dynamic>? query,
|
||||
}) =>
|
||||
Uri makeUrl(String? path, {int? id, String? objectMethod, Map<String, dynamic>? query}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
returnValue: _FakeUri_2(
|
||||
this,
|
||||
Invocation.method(
|
||||
#makeUrl,
|
||||
[path],
|
||||
{
|
||||
#id: id,
|
||||
#objectMethod: objectMethod,
|
||||
#query: query,
|
||||
},
|
||||
{#id: id, #objectMethod: objectMethod, #query: query},
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -160,10 +103,7 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<dynamic> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetch,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
)
|
||||
as _i5.Future<dynamic>);
|
||||
@@ -171,72 +111,33 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
@override
|
||||
_i5.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchPaginated,
|
||||
[uri],
|
||||
),
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i5.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> post(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#post,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
_i5.Future<Map<String, dynamic>> patch(Map<String, dynamic>? data, Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#patch,
|
||||
[
|
||||
data,
|
||||
uri,
|
||||
],
|
||||
),
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
)
|
||||
as _i5.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i5.Future<_i3.Response> deleteRequest(
|
||||
String? url,
|
||||
int? id,
|
||||
) =>
|
||||
_i5.Future<_i3.Response> deleteRequest(String? url, int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i5.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(
|
||||
#deleteRequest,
|
||||
[
|
||||
url,
|
||||
id,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])),
|
||||
),
|
||||
)
|
||||
as _i5.Future<_i3.Response>);
|
||||
|
||||
@@ -37,83 +37,39 @@ import 'package:wger/providers/user.dart' as _i13;
|
||||
// ignore_for_file: invalid_use_of_internal_member
|
||||
|
||||
class _FakeWgerBaseProvider_0 extends _i1.SmartFake implements _i2.WgerBaseProvider {
|
||||
_FakeWgerBaseProvider_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeWgerBaseProvider_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeWeightEntry_1 extends _i1.SmartFake implements _i3.WeightEntry {
|
||||
_FakeWeightEntry_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeWeightEntry_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeSharedPreferencesAsync_2 extends _i1.SmartFake implements _i4.SharedPreferencesAsync {
|
||||
_FakeSharedPreferencesAsync_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeSharedPreferencesAsync_2(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeIngredientDatabase_3 extends _i1.SmartFake implements _i5.IngredientDatabase {
|
||||
_FakeIngredientDatabase_3(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeIngredientDatabase_3(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeNutritionalPlan_4 extends _i1.SmartFake implements _i6.NutritionalPlan {
|
||||
_FakeNutritionalPlan_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeNutritionalPlan_4(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeMeal_5 extends _i1.SmartFake implements _i7.Meal {
|
||||
_FakeMeal_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeMeal_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeMealItem_6 extends _i1.SmartFake implements _i8.MealItem {
|
||||
_FakeMealItem_6(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeMealItem_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeIngredient_7 extends _i1.SmartFake implements _i9.Ingredient {
|
||||
_FakeIngredient_7(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeIngredient_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [BodyWeightProvider].
|
||||
@@ -128,81 +84,43 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@override
|
||||
List<_i3.WeightEntry> get items =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i3.WeightEntry>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i3.WeightEntry>[])
|
||||
as List<_i3.WeightEntry>);
|
||||
|
||||
@override
|
||||
set items(List<_i3.WeightEntry>? entries) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#items,
|
||||
entries,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set items(List<_i3.WeightEntry>? entries) =>
|
||||
super.noSuchMethod(Invocation.setter(#items, entries), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i3.WeightEntry findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _FakeWeightEntry_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
),
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeWeightEntry_1(this, Invocation.method(#findById, [id])),
|
||||
)
|
||||
as _i3.WeightEntry);
|
||||
|
||||
@override
|
||||
_i3.WeightEntry? findByDate(DateTime? date) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findByDate,
|
||||
[date],
|
||||
),
|
||||
)
|
||||
as _i3.WeightEntry?);
|
||||
(super.noSuchMethod(Invocation.method(#findByDate, [date])) as _i3.WeightEntry?);
|
||||
|
||||
@override
|
||||
_i11.Future<List<_i3.WeightEntry>> fetchAndSetEntries() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetEntries,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetEntries, []),
|
||||
returnValue: _i11.Future<List<_i3.WeightEntry>>.value(<_i3.WeightEntry>[]),
|
||||
)
|
||||
as _i11.Future<List<_i3.WeightEntry>>);
|
||||
@@ -210,18 +128,9 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider
|
||||
@override
|
||||
_i11.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
),
|
||||
Invocation.method(#addEntry, [entry]),
|
||||
returnValue: _i11.Future<_i3.WeightEntry>.value(
|
||||
_FakeWeightEntry_1(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addEntry,
|
||||
[entry],
|
||||
),
|
||||
),
|
||||
_FakeWeightEntry_1(this, Invocation.method(#addEntry, [entry])),
|
||||
),
|
||||
)
|
||||
as _i11.Future<_i3.WeightEntry>);
|
||||
@@ -229,10 +138,7 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider
|
||||
@override
|
||||
_i11.Future<void> editEntry(_i3.WeightEntry? entry) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editEntry,
|
||||
[entry],
|
||||
),
|
||||
Invocation.method(#editEntry, [entry]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -241,10 +147,7 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider
|
||||
@override
|
||||
_i11.Future<void> deleteEntry(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteEntry,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deleteEntry, [id]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -252,39 +155,23 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider
|
||||
|
||||
@override
|
||||
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
/// A class which mocks [UserProvider].
|
||||
@@ -297,20 +184,14 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
|
||||
|
||||
@override
|
||||
_i14.ThemeMode get themeMode =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#themeMode),
|
||||
returnValue: _i14.ThemeMode.system,
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#themeMode), returnValue: _i14.ThemeMode.system)
|
||||
as _i14.ThemeMode);
|
||||
|
||||
@override
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@@ -318,73 +199,38 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
|
||||
_i4.SharedPreferencesAsync get prefs =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#prefs),
|
||||
returnValue: _FakeSharedPreferencesAsync_2(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
),
|
||||
returnValue: _FakeSharedPreferencesAsync_2(this, Invocation.getter(#prefs)),
|
||||
)
|
||||
as _i4.SharedPreferencesAsync);
|
||||
|
||||
@override
|
||||
set themeMode(_i14.ThemeMode? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#themeMode,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set themeMode(_i14.ThemeMode? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#themeMode, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set prefs(_i4.SharedPreferencesAsync? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#prefs,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set prefs(_i4.SharedPreferencesAsync? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#prefs, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set profile(_i15.Profile? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#profile,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set profile(_i15.Profile? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#profile, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void setThemeMode(_i14.ThemeMode? mode) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setThemeMode,
|
||||
[mode],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void setThemeMode(_i14.ThemeMode? mode) =>
|
||||
super.noSuchMethod(Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetProfile() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetProfile,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetProfile, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -393,10 +239,7 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
|
||||
@override
|
||||
_i11.Future<void> saveProfile() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveProfile,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#saveProfile, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -405,10 +248,7 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
|
||||
@override
|
||||
_i11.Future<void> verifyEmail() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#verifyEmail,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#verifyEmail, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -416,39 +256,23 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider {
|
||||
|
||||
@override
|
||||
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
/// A class which mocks [NutritionPlansProvider].
|
||||
@@ -463,10 +287,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
_i2.WgerBaseProvider get baseProvider =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#baseProvider),
|
||||
returnValue: _FakeWgerBaseProvider_0(
|
||||
this,
|
||||
Invocation.getter(#baseProvider),
|
||||
),
|
||||
returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)),
|
||||
)
|
||||
as _i2.WgerBaseProvider);
|
||||
|
||||
@@ -474,98 +295,52 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
_i5.IngredientDatabase get database =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#database),
|
||||
returnValue: _FakeIngredientDatabase_3(
|
||||
this,
|
||||
Invocation.getter(#database),
|
||||
),
|
||||
returnValue: _FakeIngredientDatabase_3(this, Invocation.getter(#database)),
|
||||
)
|
||||
as _i5.IngredientDatabase);
|
||||
|
||||
@override
|
||||
List<_i9.Ingredient> get ingredients =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#ingredients),
|
||||
returnValue: <_i9.Ingredient>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i9.Ingredient>[])
|
||||
as List<_i9.Ingredient>);
|
||||
|
||||
@override
|
||||
List<_i6.NutritionalPlan> get items =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#items),
|
||||
returnValue: <_i6.NutritionalPlan>[],
|
||||
)
|
||||
(super.noSuchMethod(Invocation.getter(#items), returnValue: <_i6.NutritionalPlan>[])
|
||||
as List<_i6.NutritionalPlan>);
|
||||
|
||||
@override
|
||||
set database(_i5.IngredientDatabase? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#database,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set database(_i5.IngredientDatabase? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
set ingredients(List<_i9.Ingredient>? value) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#ingredients,
|
||||
value,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
set ingredients(List<_i9.Ingredient>? value) =>
|
||||
super.noSuchMethod(Invocation.setter(#ingredients, value), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
)
|
||||
as bool);
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clear,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void clear() =>
|
||||
super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
_i6.NutritionalPlan findById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
returnValue: _FakeNutritionalPlan_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#findById,
|
||||
[id],
|
||||
),
|
||||
),
|
||||
Invocation.method(#findById, [id]),
|
||||
returnValue: _FakeNutritionalPlan_4(this, Invocation.method(#findById, [id])),
|
||||
)
|
||||
as _i6.NutritionalPlan);
|
||||
|
||||
@override
|
||||
_i7.Meal? findMealById(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#findMealById,
|
||||
[id],
|
||||
),
|
||||
)
|
||||
as _i7.Meal?);
|
||||
(super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i7.Meal?);
|
||||
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetAllPlansSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansSparse,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansSparse, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -574,10 +349,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetAllPlansFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetAllPlansFull,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchAndSetAllPlansFull, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -586,18 +358,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
Invocation.method(#fetchAndSetPlanSparse, [planId]),
|
||||
returnValue: _i11.Future<_i6.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanSparse,
|
||||
[planId],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_4(this, Invocation.method(#fetchAndSetPlanSparse, [planId])),
|
||||
),
|
||||
)
|
||||
as _i11.Future<_i6.NutritionalPlan>);
|
||||
@@ -605,18 +368,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
Invocation.method(#fetchAndSetPlanFull, [planId]),
|
||||
returnValue: _i11.Future<_i6.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchAndSetPlanFull,
|
||||
[planId],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_4(this, Invocation.method(#fetchAndSetPlanFull, [planId])),
|
||||
),
|
||||
)
|
||||
as _i11.Future<_i6.NutritionalPlan>);
|
||||
@@ -624,18 +378,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
Invocation.method(#addPlan, [planData]),
|
||||
returnValue: _i11.Future<_i6.NutritionalPlan>.value(
|
||||
_FakeNutritionalPlan_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addPlan,
|
||||
[planData],
|
||||
),
|
||||
),
|
||||
_FakeNutritionalPlan_4(this, Invocation.method(#addPlan, [planData])),
|
||||
),
|
||||
)
|
||||
as _i11.Future<_i6.NutritionalPlan>);
|
||||
@@ -643,10 +388,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<void> editPlan(_i6.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editPlan,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#editPlan, [plan]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -655,39 +397,18 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<void> deletePlan(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deletePlan,
|
||||
[id],
|
||||
),
|
||||
Invocation.method(#deletePlan, [id]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i7.Meal> addMeal(
|
||||
_i7.Meal? meal,
|
||||
int? planId,
|
||||
) =>
|
||||
_i11.Future<_i7.Meal> addMeal(_i7.Meal? meal, int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addMeal,
|
||||
[
|
||||
meal,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
Invocation.method(#addMeal, [meal, planId]),
|
||||
returnValue: _i11.Future<_i7.Meal>.value(
|
||||
_FakeMeal_5(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addMeal,
|
||||
[
|
||||
meal,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeMeal_5(this, Invocation.method(#addMeal, [meal, planId])),
|
||||
),
|
||||
)
|
||||
as _i11.Future<_i7.Meal>);
|
||||
@@ -695,18 +416,9 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<_i7.Meal> editMeal(_i7.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#editMeal,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#editMeal, [meal]),
|
||||
returnValue: _i11.Future<_i7.Meal>.value(
|
||||
_FakeMeal_5(
|
||||
this,
|
||||
Invocation.method(
|
||||
#editMeal,
|
||||
[meal],
|
||||
),
|
||||
),
|
||||
_FakeMeal_5(this, Invocation.method(#editMeal, [meal])),
|
||||
),
|
||||
)
|
||||
as _i11.Future<_i7.Meal>);
|
||||
@@ -714,39 +426,18 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<void> deleteMeal(_i7.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMeal,
|
||||
[meal],
|
||||
),
|
||||
Invocation.method(#deleteMeal, [meal]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<_i8.MealItem> addMealItem(
|
||||
_i8.MealItem? mealItem,
|
||||
_i7.Meal? meal,
|
||||
) =>
|
||||
_i11.Future<_i8.MealItem> addMealItem(_i8.MealItem? mealItem, _i7.Meal? meal) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addMealItem,
|
||||
[
|
||||
mealItem,
|
||||
meal,
|
||||
],
|
||||
),
|
||||
Invocation.method(#addMealItem, [mealItem, meal]),
|
||||
returnValue: _i11.Future<_i8.MealItem>.value(
|
||||
_FakeMealItem_6(
|
||||
this,
|
||||
Invocation.method(
|
||||
#addMealItem,
|
||||
[
|
||||
mealItem,
|
||||
meal,
|
||||
],
|
||||
),
|
||||
),
|
||||
_FakeMealItem_6(this, Invocation.method(#addMealItem, [mealItem, meal])),
|
||||
),
|
||||
)
|
||||
as _i11.Future<_i8.MealItem>);
|
||||
@@ -754,10 +445,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<void> deleteMealItem(_i8.MealItem? mealItem) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteMealItem,
|
||||
[mealItem],
|
||||
),
|
||||
Invocation.method(#deleteMealItem, [mealItem]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -766,10 +454,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<void> clearIngredientCache() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearIngredientCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#clearIngredientCache, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -781,19 +466,11 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
_i5.IngredientDatabase? database,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
{#database: database},
|
||||
),
|
||||
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
|
||||
returnValue: _i11.Future<_i9.Ingredient>.value(
|
||||
_FakeIngredient_7(
|
||||
this,
|
||||
Invocation.method(
|
||||
#fetchIngredient,
|
||||
[ingredientId],
|
||||
{#database: database},
|
||||
),
|
||||
Invocation.method(#fetchIngredient, [ingredientId], {#database: database}),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -802,10 +479,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<void> fetchIngredientsFromCache() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchIngredientsFromCache,
|
||||
[],
|
||||
),
|
||||
Invocation.method(#fetchIngredientsFromCache, []),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -821,10 +495,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
Invocation.method(
|
||||
#searchIngredient,
|
||||
[name],
|
||||
{
|
||||
#languageCode: languageCode,
|
||||
#searchEnglish: searchEnglish,
|
||||
},
|
||||
{#languageCode: languageCode, #searchEnglish: searchEnglish},
|
||||
),
|
||||
returnValue: _i11.Future<List<_i9.Ingredient>>.value(<_i9.Ingredient>[]),
|
||||
)
|
||||
@@ -833,27 +504,15 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<_i9.Ingredient?> searchIngredientWithBarcode(String? barcode) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchIngredientWithBarcode,
|
||||
[barcode],
|
||||
),
|
||||
Invocation.method(#searchIngredientWithBarcode, [barcode]),
|
||||
returnValue: _i11.Future<_i9.Ingredient?>.value(),
|
||||
)
|
||||
as _i11.Future<_i9.Ingredient?>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> logMealToDiary(
|
||||
_i7.Meal? meal,
|
||||
DateTime? mealDateTime,
|
||||
) =>
|
||||
_i11.Future<void> logMealToDiary(_i7.Meal? meal, DateTime? mealDateTime) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logMealToDiary,
|
||||
[
|
||||
meal,
|
||||
mealDateTime,
|
||||
],
|
||||
),
|
||||
Invocation.method(#logMealToDiary, [meal, mealDateTime]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -866,32 +525,16 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
DateTime? dateTime,
|
||||
]) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#logIngredientToDiary,
|
||||
[
|
||||
mealItem,
|
||||
planId,
|
||||
dateTime,
|
||||
],
|
||||
),
|
||||
Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
as _i11.Future<void>);
|
||||
|
||||
@override
|
||||
_i11.Future<void> deleteLog(
|
||||
int? logId,
|
||||
int? planId,
|
||||
) =>
|
||||
_i11.Future<void> deleteLog(int? logId, int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteLog,
|
||||
[
|
||||
logId,
|
||||
planId,
|
||||
],
|
||||
),
|
||||
Invocation.method(#deleteLog, [logId, planId]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -900,10 +543,7 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
@override
|
||||
_i11.Future<void> fetchAndSetLogs(_i6.NutritionalPlan? plan) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchAndSetLogs,
|
||||
[plan],
|
||||
),
|
||||
Invocation.method(#fetchAndSetLogs, [plan]),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
)
|
||||
@@ -911,37 +551,21 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans
|
||||
|
||||
@override
|
||||
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
),
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#dispose,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void dispose() =>
|
||||
super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null);
|
||||
|
||||
@override
|
||||
void notifyListeners() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#notifyListeners,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
void notifyListeners() =>
|
||||
super.noSuchMethod(Invocation.method(#notifyListeners, []), returnValueForMissingStub: null);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ Routine getTestRoutine({List<Exercise>? exercises}) {
|
||||
|
||||
final slotEntryBenchPress = SlotEntry(
|
||||
slotId: 1,
|
||||
type: 'normal',
|
||||
type: SlotEntryType.normal,
|
||||
order: 1,
|
||||
exerciseId: 1,
|
||||
repetitionUnitId: 1,
|
||||
@@ -123,12 +123,8 @@ Routine getTestRoutine({List<Exercise>? exercises}) {
|
||||
repetitionUnit: testRepetitionUnit1,
|
||||
weightUnit: testWeightUnit1,
|
||||
exercise: testExercises[0],
|
||||
nrOfSetsConfigs: [
|
||||
BaseConfig.firstIteration(4, 1),
|
||||
],
|
||||
repetitionsConfigs: [
|
||||
BaseConfig.firstIteration(3, 1),
|
||||
],
|
||||
nrOfSetsConfigs: [BaseConfig.firstIteration(4, 1)],
|
||||
repetitionsConfigs: [BaseConfig.firstIteration(3, 1)],
|
||||
weightConfigs: [
|
||||
BaseConfig.firstIteration(100, 1),
|
||||
BaseConfig(
|
||||
@@ -144,18 +140,13 @@ Routine getTestRoutine({List<Exercise>? exercises}) {
|
||||
],
|
||||
);
|
||||
|
||||
final slotBenchPress = Slot.withData(
|
||||
id: 1,
|
||||
day: 1,
|
||||
order: 1,
|
||||
comment: 'Make sure to warm up',
|
||||
);
|
||||
final slotBenchPress = Slot.withData(id: 1, day: 1, order: 1, comment: 'Make sure to warm up');
|
||||
slotBenchPress.addExerciseBase(testExercises[0]);
|
||||
slotBenchPress.entries.add(slotEntryBenchPress);
|
||||
|
||||
final slotEntrySquat = SlotEntry(
|
||||
slotId: 2,
|
||||
type: 'normal',
|
||||
type: SlotEntryType.normal,
|
||||
order: 1,
|
||||
exerciseId: 8,
|
||||
repetitionUnitId: 1,
|
||||
@@ -166,15 +157,9 @@ Routine getTestRoutine({List<Exercise>? exercises}) {
|
||||
repetitionUnit: testRepetitionUnit1,
|
||||
weightUnit: testWeightUnit1,
|
||||
exercise: testExercises[4],
|
||||
weightConfigs: [
|
||||
BaseConfig.firstIteration(80, 1),
|
||||
],
|
||||
repetitionsConfigs: [
|
||||
BaseConfig.firstIteration(5, 1),
|
||||
],
|
||||
nrOfSetsConfigs: [
|
||||
BaseConfig.firstIteration(3, 1),
|
||||
],
|
||||
weightConfigs: [BaseConfig.firstIteration(80, 1)],
|
||||
repetitionsConfigs: [BaseConfig.firstIteration(5, 1)],
|
||||
nrOfSetsConfigs: [BaseConfig.firstIteration(3, 1)],
|
||||
);
|
||||
|
||||
final slotSquat = Slot.withData(id: 2, day: 1, order: 1);
|
||||
@@ -183,7 +168,7 @@ Routine getTestRoutine({List<Exercise>? exercises}) {
|
||||
|
||||
final slotEntrySideRaises = SlotEntry(
|
||||
slotId: 2,
|
||||
type: 'normal',
|
||||
type: SlotEntryType.normal,
|
||||
order: 1,
|
||||
exerciseId: 8,
|
||||
repetitionUnitId: 1,
|
||||
@@ -194,15 +179,9 @@ Routine getTestRoutine({List<Exercise>? exercises}) {
|
||||
repetitionUnit: testRepetitionUnit1,
|
||||
weightUnit: testWeightUnit1,
|
||||
exercise: testExercises[5],
|
||||
nrOfSetsConfigs: [
|
||||
BaseConfig.firstIteration(4, 1),
|
||||
],
|
||||
repetitionsConfigs: [
|
||||
BaseConfig.firstIteration(12, 1),
|
||||
],
|
||||
weightConfigs: [
|
||||
BaseConfig.firstIteration(10, 1),
|
||||
],
|
||||
nrOfSetsConfigs: [BaseConfig.firstIteration(4, 1)],
|
||||
repetitionsConfigs: [BaseConfig.firstIteration(12, 1)],
|
||||
weightConfigs: [BaseConfig.firstIteration(10, 1)],
|
||||
);
|
||||
// settingSideRaises.weight = 6;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user