diff --git a/.github/actions/flutter-common/action.yml b/.github/actions/flutter-common/action.yml index f3e4a73f..cfeeac9b 100644 --- a/.github/actions/flutter-common/action.yml +++ b/.github/actions/flutter-common/action.yml @@ -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 diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 163674e2..2b62b5a3 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -155,8 +155,18 @@ "@category": { "description": "Category for an exercise, ingredient, etc." }, - "endDate": "End date", "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", "routines": "Routines", "newRoutine": "New routine", "noRoutines": "You have no routines", @@ -387,13 +397,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": { diff --git a/lib/models/workouts/day.dart b/lib/models/workouts/day.dart index 1126267f..ed7c1cae 100644 --- a/lib/models/workouts/day.dart +++ b/lib/models/workouts/day.dart @@ -16,11 +16,40 @@ * along with this program. If not, see . */ +import 'package:flutter/widgets.dart'; 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(BuildContext context) { + final i18n = AppLocalizations.of(context); + + 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 +68,65 @@ 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 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? 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; + // Boilerplate factory Day.fromJson(Map json) => _$DayFromJson(json); diff --git a/lib/models/workouts/day.g.dart b/lib/models/workouts/day.g.dart index 000f7331..27f17564 100644 --- a/lib/models/workouts/day.g.dart +++ b/lib/models/workouts/day.g.dart @@ -14,24 +14,25 @@ Day _$DayFromJson(Map json) { 'routine', 'name', 'description', + 'type', 'is_rest', 'need_logs_to_advance', - 'type', 'order', - 'config' + 'config', ], ); return Day( 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, - slots: (json['slots'] as List?) + type: $enumDecodeNullable(_$DayTypeEnumMap, json['type']) ?? DayType.custom, + order: json['order'] as num? ?? 1, + config: json['config'], + slots: + (json['slots'] as List?) ?.map((e) => Slot.fromJson(e as Map)) .toList() ?? [], @@ -39,12 +40,23 @@ Day _$DayFromJson(Map json) { } Map _$DayToJson(Day instance) => { - 'routine': instance.routineId, - 'name': instance.name, - 'description': instance.description, - 'is_rest': instance.isRest, - 'need_logs_to_advance': instance.needLogsToAdvance, - 'type': instance.type, - 'order': instance.order, - 'config': instance.config, - }; + 'routine': instance.routineId, + 'name': instance.name, + 'description': instance.description, + 'type': _$DayTypeEnumMap[instance.type]!, + 'is_rest': instance.isRest, + 'need_logs_to_advance': instance.needLogsToAdvance, + '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', +}; diff --git a/lib/models/workouts/day_data.g.dart b/lib/models/workouts/day_data.g.dart index 08e08e19..4744c90b 100644 --- a/lib/models/workouts/day_data.g.dart +++ b/lib/models/workouts/day_data.g.dart @@ -7,16 +7,14 @@ part of 'day_data.dart'; // ************************************************************************** DayData _$DayDataFromJson(Map json) { - $checkKeys( - json, - requiredKeys: const ['iteration', 'date', 'label'], - ); + $checkKeys(json, requiredKeys: const ['iteration', 'date', 'label']); return DayData( iteration: (json['iteration'] as num).toInt(), date: DateTime.parse(json['date'] as String), label: json['label'] as String? ?? '', day: json['day'] == null ? null : Day.fromJson(json['day'] as Map), - slots: (json['slots'] as List?) + slots: + (json['slots'] as List?) ?.map((e) => SlotData.fromJson(e as Map)) .toList() ?? const [], @@ -24,9 +22,9 @@ DayData _$DayDataFromJson(Map json) { } Map _$DayDataToJson(DayData instance) => { - 'iteration': instance.iteration, - 'date': instance.date.toIso8601String(), - 'label': instance.label, - 'day': instance.day, - 'slots': instance.slots, - }; + 'iteration': instance.iteration, + 'date': instance.date.toIso8601String(), + 'label': instance.label, + 'day': instance.day, + 'slots': instance.slots, +}; diff --git a/lib/models/workouts/slot.g.dart b/lib/models/workouts/slot.g.dart index 0d1085af..c059c53a 100644 --- a/lib/models/workouts/slot.g.dart +++ b/lib/models/workouts/slot.g.dart @@ -7,25 +7,24 @@ part of 'slot.dart'; // ************************************************************************** Slot _$SlotFromJson(Map json) { - $checkKeys( - json, - requiredKeys: const ['id', 'order', 'comment', 'config'], - ); + $checkKeys(json, requiredKeys: const ['id', 'order', 'comment', 'config']); return Slot( - id: (json['id'] as num?)?.toInt(), - day: (json['day'] as num).toInt(), - comment: json['comment'] as String? ?? '', - order: (json['order'] as num).toInt(), - config: json['config'], - )..entries = (json['entries'] as List?) - ?.map((e) => SlotEntry.fromJson(e as Map)) - .toList() ?? - []; + id: (json['id'] as num?)?.toInt(), + day: (json['day'] as num).toInt(), + comment: json['comment'] as String? ?? '', + order: (json['order'] as num).toInt(), + config: json['config'], + ) + ..entries = + (json['entries'] as List?) + ?.map((e) => SlotEntry.fromJson(e as Map)) + .toList() ?? + []; } Map _$SlotToJson(Slot instance) => { - 'day': instance.day, - 'order': instance.order, - 'comment': instance.comment, - 'config': instance.config, - }; + 'day': instance.day, + 'order': instance.order, + 'comment': instance.comment, + 'config': instance.config, +}; diff --git a/lib/models/workouts/slot_data.g.dart b/lib/models/workouts/slot_data.g.dart index cafada4a..29b7ebaa 100644 --- a/lib/models/workouts/slot_data.g.dart +++ b/lib/models/workouts/slot_data.g.dart @@ -7,16 +7,14 @@ part of 'slot_data.dart'; // ************************************************************************** SlotData _$SlotDataFromJson(Map 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, exerciseIds: (json['exercises'] as List?)?.map((e) => (e as num).toInt()).toList() ?? const [], - setConfigs: (json['sets'] as List?) + setConfigs: + (json['sets'] as List?) ?.map((e) => SetConfigData.fromJson(e as Map)) .toList() ?? const [], @@ -24,8 +22,8 @@ SlotData _$SlotDataFromJson(Map json) { } Map _$SlotDataToJson(SlotData instance) => { - 'comment': instance.comment, - 'is_superset': instance.isSuperset, - 'exercises': instance.exerciseIds, - 'sets': instance.setConfigs, - }; + 'comment': instance.comment, + 'is_superset': instance.isSuperset, + 'exercises': instance.exerciseIds, + 'sets': instance.setConfigs, +}; diff --git a/lib/models/workouts/slot_entry.dart b/lib/models/workouts/slot_entry.dart index 2b57e22f..ef07e966 100644 --- a/lib/models/workouts/slot_entry.dart +++ b/lib/models/workouts/slot_entry.dart @@ -26,6 +26,8 @@ import 'package:wger/models/workouts/weight_unit.dart'; part 'slot_entry.g.dart'; +enum SlotEntryType { normal, dropset, myo, partial, forced, tut, iso, jump } + enum ConfigType { weight, maxWeight, @@ -163,9 +165,9 @@ class SlotEntry { String? type, required Exercise exercise, int? weightUnitId, - num? weightRounding, + this.weightRounding, int? repetitionUnitId, - num? repetitionRounding, + this.repetitionRounding, }) { this.order = order ?? 1; this.comment = comment ?? ''; @@ -174,13 +176,11 @@ class SlotEntry { 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'; } diff --git a/lib/models/workouts/slot_entry.g.dart b/lib/models/workouts/slot_entry.g.dart index 71be96ab..5de52481 100644 --- a/lib/models/workouts/slot_entry.g.dart +++ b/lib/models/workouts/slot_entry.g.dart @@ -20,7 +20,7 @@ SlotEntry _$SlotEntryFromJson(Map json) { 'repetition_rounding', 'weight_unit', 'weight_rounding', - 'config' + 'config', ], ); return SlotEntry( @@ -34,43 +34,53 @@ SlotEntry _$SlotEntryFromJson(Map json) { weightUnitId: (json['weight_unit'] as num?)?.toInt(), weightRounding: stringToNumNull(json['weight_rounding'] as String?), comment: json['comment'] as String, - weightConfigs: (json['weight_configs'] as List?) + weightConfigs: + (json['weight_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - maxWeightConfigs: (json['max_weight_configs'] as List?) + maxWeightConfigs: + (json['max_weight_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - nrOfSetsConfigs: (json['set_nr_configs'] as List?) + nrOfSetsConfigs: + (json['set_nr_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - maxNrOfSetsConfigs: (json['max_set_nr_configs'] as List?) + maxNrOfSetsConfigs: + (json['max_set_nr_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - rirConfigs: (json['rir_configs'] as List?) + rirConfigs: + (json['rir_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - maxRirConfigs: (json['max_rir_configs'] as List?) + maxRirConfigs: + (json['max_rir_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - restTimeConfigs: (json['rest_configs'] as List?) + restTimeConfigs: + (json['rest_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - maxRestTimeConfigs: (json['max_rest_configs'] as List?) + maxRestTimeConfigs: + (json['max_rest_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - repetitionsConfigs: (json['repetitions_configs'] as List?) + repetitionsConfigs: + (json['repetitions_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], - maxRepetitionsConfigs: (json['max_repetitions_configs'] as List?) + maxRepetitionsConfigs: + (json['max_repetitions_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [], @@ -78,14 +88,14 @@ SlotEntry _$SlotEntryFromJson(Map json) { } Map _$SlotEntryToJson(SlotEntry instance) => { - 'slot': instance.slotId, - 'order': instance.order, - 'comment': instance.comment, - 'type': instance.type, - 'exercise': instance.exerciseId, - 'repetition_unit': instance.repetitionUnitId, - 'repetition_rounding': instance.repetitionRounding, - 'weight_unit': instance.weightUnitId, - 'weight_rounding': instance.weightRounding, - 'config': instance.config, - }; + 'slot': instance.slotId, + 'order': instance.order, + 'comment': instance.comment, + 'type': instance.type, + 'exercise': instance.exerciseId, + 'repetition_unit': instance.repetitionUnitId, + 'repetition_rounding': instance.repetitionRounding, + 'weight_unit': instance.weightUnitId, + 'weight_rounding': instance.weightRounding, + 'config': instance.config, +}; diff --git a/lib/widgets/routines/day.dart b/lib/widgets/routines/day.dart index 46bc5e3c..875f6a92 100644 --- a/lib/widgets/routines/day.dart +++ b/lib/widgets/routines/day.dart @@ -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(); }, @@ -128,9 +123,9 @@ class DayHeader extends StatelessWidget { final bool _viewMode; const DayHeader({required DayData day, required int routineId, bool viewMode = false}) - : _dayData = day, - _viewMode = viewMode, - _routineId = routineId; + : _dayData = day, + _viewMode = viewMode, + _routineId = routineId; @override Widget build(BuildContext context) { @@ -151,11 +146,15 @@ class DayHeader extends StatelessWidget { ); } + final dayTypeLabel = _dayData.day!.isSpecialType + ? '\n(${_dayData.day!.type.name.toUpperCase()})' + : ''; + return ListTile( tileColor: Theme.of(context).focusColor, contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), title: Text( - _dayData.day!.name, + '${_dayData.day!.name}$dayTypeLabel', style: Theme.of(context).textTheme.headlineSmall, overflow: TextOverflow.ellipsis, ), diff --git a/lib/widgets/routines/forms/day.dart b/lib/widgets/routines/forms/day.dart index d5a6fc38..e5374f77 100644 --- a/lib/widgets/routines/forms/day.dart +++ b/lib/widgets/routines/forms/day.dart @@ -102,10 +102,7 @@ class _ReorderableDaysListState extends State { ), IconButton( icon: const Icon(Icons.delete), - onPressed: () => widget._showDeleteConfirmationDialog( - context, - day, - ), + onPressed: () => widget._showDeleteConfirmationDialog(context, day), ), ], ), @@ -149,7 +146,11 @@ class _ReorderableDaysListState extends State { 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 { } 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 { final descriptionController = TextEditingController(); final nameController = TextEditingController(); - late bool isRestDay; - late bool needLogsToAdvance; bool isSaving = false; final _form = GlobalKey(); @@ -190,8 +188,6 @@ class _DayFormWidgetState extends State { @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 { 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 { 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 { return null; }, ), + TextFormField( key: const Key('field-description'), enabled: !widget.day.isRest, @@ -281,19 +278,36 @@ class _DayFormWidgetState extends State { return null; }, ), + DropdownButtonFormField( + key: const Key('field-day-type'), + initialValue: widget.day.type, + decoration: const InputDecoration(labelText: 'Typ'), + items: DayType.values.map((type) { + return DropdownMenuItem( + value: type, + child: Text('${type.name.toUpperCase()} - ${type.i18Label(context)}'), + ); + }).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), @@ -309,8 +323,10 @@ class _DayFormWidgetState extends State { setState(() => isSaving = true); try { - await Provider.of(context, listen: false) - .editDay(widget.day); + await Provider.of( + context, + listen: false, + ).editDay(widget.day); if (context.mounted) { setState(() { errorMessage = const SizedBox.shrink(); @@ -330,8 +346,9 @@ class _DayFormWidgetState extends State { } } }, - child: - isSaving ? const FormProgressIndicator() : Text(AppLocalizations.of(context).save), + child: isSaving + ? const FormProgressIndicator() + : Text(AppLocalizations.of(context).save), ), const SizedBox(height: 5), ReorderableSlotList(widget.day.slots, widget.day), diff --git a/lib/widgets/routines/forms/rir.dart b/lib/widgets/routines/forms/rir.dart index 5c70da03..254a3603 100644 --- a/lib/widgets/routines/forms/rir.dart +++ b/lib/widgets/routines/forms/rir.dart @@ -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; } diff --git a/lib/widgets/routines/gym_mode/start_page.dart b/lib/widgets/routines/gym_mode/start_page.dart index 6afef502..15a9eab4 100644 --- a/lib/widgets/routines/gym_mode/start_page.dart +++ b/lib/widgets/routines/gym_mode/start_page.dart @@ -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,6 +25,17 @@ 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(context)}', + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.headlineSmall, + ), + ), + ), ..._dayData.slots.map((slotData) { return Column( children: [ @@ -42,9 +54,11 @@ class StartPage extends StatelessWidget { width: 45, child: ExerciseImageWidget(image: exercise.getMainImage), ), - title: Text(exercise - .getTranslation(Localizations.localeOf(context).languageCode) - .name), + title: Text( + exercise + .getTranslation(Localizations.localeOf(context).languageCode) + .name, + ), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: entry.value.map((text) => Text(text)).toList(), diff --git a/lib/widgets/routines/routine_edit.dart b/lib/widgets/routines/routine_edit.dart index 67fb9844..081f88f4 100644 --- a/lib/widgets/routines/routine_edit.dart +++ b/lib/widgets/routines/routine_edit.dart @@ -53,10 +53,7 @@ class _RoutineEditState extends State { 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 { }); }, ), - 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), ], diff --git a/test/auth/auth_screen_test.mocks.dart b/test/auth/auth_screen_test.mocks.dart index 3d3e2163..f303de9d 100644 --- a/test/auth/auth_screen_test.mocks.dart +++ b/test/auth/auth_screen_test.mocks.dart @@ -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,46 +44,24 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i3.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0(this, Invocation.method(#head, [url], {#headers: headers})), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0(this, Invocation.method(#get, [url], {#headers: headers})), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> post( @@ -104,28 +71,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> put( @@ -135,28 +93,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> patch( @@ -166,28 +115,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> delete( @@ -197,85 +137,53 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future read( - Uri? url, { - Map? headers, - }) => + _i3.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future.value(_i5.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future); + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i3.Future.value( + _i5.dummyValue(this, Invocation.method(#read, [url], {#headers: headers})), + ), + ) + as _i3.Future); @override - _i3.Future<_i6.Uint8List> readBytes( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i6.Uint8List> readBytes(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), - ) as _i3.Future<_i6.Uint8List>); + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), + ) + as _i3.Future<_i6.Uint8List>); @override - _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i3.Future<_i2.StreamedResponse>); + _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method(#send, [request]), + returnValue: _i3.Future<_i2.StreamedResponse>.value( + _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); } diff --git a/test/core/settings_test.mocks.dart b/test/core/settings_test.mocks.dart index 5f661123..f6a3f1b5 100644 --- a/test/core/settings_test.mocks.dart +++ b/test/core/settings_test.mocks.dart @@ -44,173 +44,78 @@ import 'package:wger/providers/user.dart' as _i21; // 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 _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase { - _FakeExerciseDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseDatabase_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise { - _FakeExercise_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory { - _FakeExerciseCategory_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseCategory_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEquipment_4 extends _i1.SmartFake implements _i6.Equipment { - _FakeEquipment_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEquipment_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMuscle_5 extends _i1.SmartFake implements _i7.Muscle { - _FakeMuscle_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMuscle_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeLanguage_6 extends _i1.SmartFake implements _i8.Language { - _FakeLanguage_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLanguage_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeIngredientDatabase_7 extends _i1.SmartFake implements _i9.IngredientDatabase { - _FakeIngredientDatabase_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredientDatabase_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeNutritionalPlan_8 extends _i1.SmartFake implements _i10.NutritionalPlan { - _FakeNutritionalPlan_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeNutritionalPlan_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeMeal_9 extends _i1.SmartFake implements _i11.Meal { - _FakeMeal_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMeal_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMealItem_10 extends _i1.SmartFake implements _i12.MealItem { - _FakeMealItem_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMealItem_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeIngredient_11 extends _i1.SmartFake implements _i13.Ingredient { - _FakeIngredient_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeIngredient_11(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSharedPreferencesAsync_12 extends _i1.SmartFake implements _i14.SharedPreferencesAsync { - _FakeSharedPreferencesAsync_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSharedPreferencesAsync_12(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeAuthProvider_13 extends _i1.SmartFake implements _i15.AuthProvider { - _FakeAuthProvider_13( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAuthProvider_13(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeClient_14 extends _i1.SmartFake implements _i16.Client { - _FakeClient_14( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeClient_14(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeUri_15 extends _i1.SmartFake implements Uri { - _FakeUri_15( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeUri_15(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeResponse_16 extends _i1.SmartFake implements _i16.Response { - _FakeResponse_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_16(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [ExercisesProvider]. @@ -222,292 +127,211 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i3.ExerciseDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeExerciseDatabase_1( - this, - Invocation.getter(#database), - ), - ) as _i3.ExerciseDatabase); + _i3.ExerciseDatabase get database => + (super.noSuchMethod( + Invocation.getter(#database), + returnValue: _FakeExerciseDatabase_1(this, Invocation.getter(#database)), + ) + as _i3.ExerciseDatabase); @override - List<_i4.Exercise> get exercises => (super.noSuchMethod( - Invocation.getter(#exercises), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + List<_i4.Exercise> get exercises => + (super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i4.Exercise>[]) + as List<_i4.Exercise>); @override - List<_i4.Exercise> get filteredExercises => (super.noSuchMethod( - Invocation.getter(#filteredExercises), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + List<_i4.Exercise> get filteredExercises => + (super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i4.Exercise>[]) + as List<_i4.Exercise>); @override - Map> get exerciseByVariation => (super.noSuchMethod( - Invocation.getter(#exerciseByVariation), - returnValue: >{}, - ) as Map>); + Map> get exerciseByVariation => + (super.noSuchMethod( + Invocation.getter(#exerciseByVariation), + returnValue: >{}, + ) + as Map>); @override - List<_i5.ExerciseCategory> get categories => (super.noSuchMethod( - Invocation.getter(#categories), - returnValue: <_i5.ExerciseCategory>[], - ) as List<_i5.ExerciseCategory>); + List<_i5.ExerciseCategory> get categories => + (super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i5.ExerciseCategory>[]) + as List<_i5.ExerciseCategory>); @override - List<_i7.Muscle> get muscles => (super.noSuchMethod( - Invocation.getter(#muscles), - returnValue: <_i7.Muscle>[], - ) as List<_i7.Muscle>); + List<_i7.Muscle> get muscles => + (super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i7.Muscle>[]) + as List<_i7.Muscle>); @override - List<_i6.Equipment> get equipment => (super.noSuchMethod( - Invocation.getter(#equipment), - returnValue: <_i6.Equipment>[], - ) as List<_i6.Equipment>); + List<_i6.Equipment> get equipment => + (super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i6.Equipment>[]) + as List<_i6.Equipment>); @override - List<_i8.Language> get languages => (super.noSuchMethod( - Invocation.getter(#languages), - returnValue: <_i8.Language>[], - ) as List<_i8.Language>); + List<_i8.Language> get languages => + (super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i8.Language>[]) + as List<_i8.Language>); @override - set database(_i3.ExerciseDatabase? value) => super.noSuchMethod( - Invocation.setter( - #database, - value, - ), - returnValueForMissingStub: null, - ); + set database(_i3.ExerciseDatabase? value) => + super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null); @override - set exercises(List<_i4.Exercise>? value) => super.noSuchMethod( - Invocation.setter( - #exercises, - value, - ), - returnValueForMissingStub: null, - ); + set exercises(List<_i4.Exercise>? value) => + super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null); @override set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#filteredExercises, newFilteredExercises), + returnValueForMissingStub: null, + ); @override - set languages(List<_i8.Language>? languages) => super.noSuchMethod( - Invocation.setter( - #languages, - languages, - ), - returnValueForMissingStub: null, - ); + set languages(List<_i8.Language>? languages) => + super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i18.Future setFilters(_i17.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); - - @override - void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i18.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i4.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method( - #findExerciseById, - [id], - ), - returnValue: _FakeExercise_2( - this, - Invocation.method( - #findExerciseById, - [id], - ), - ), - ) as _i4.Exercise); - - @override - List<_i4.Exercise> findExercisesByVariationId( - int? variationId, { - int? exerciseIdToExclude, - }) => + _i18.Future setFilters(_i17.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #findExercisesByVariationId, - [variationId], - {#exerciseIdToExclude: exerciseIdToExclude}, - ), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + Invocation.method(#setFilters, [newFilters]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i5.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeExerciseCategory_3( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i5.ExerciseCategory); + void initFilters() => + super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null); @override - _i6.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), - returnValue: _FakeEquipment_4( - this, - Invocation.method( - #findEquipmentById, - [id], - ), - ), - ) as _i6.Equipment); + _i18.Future findByFilters() => + (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i7.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), - returnValue: _FakeMuscle_5( - this, - Invocation.method( - #findMuscleById, - [id], - ), - ), - ) as _i7.Muscle); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i8.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), - returnValue: _FakeLanguage_6( - this, - Invocation.method( - #findLanguageById, - [id], - ), - ), - ) as _i8.Language); + _i4.Exercise findExerciseById(int? id) => + (super.noSuchMethod( + Invocation.method(#findExerciseById, [id]), + returnValue: _FakeExercise_2(this, Invocation.method(#findExerciseById, [id])), + ) + as _i4.Exercise); @override - _i18.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + List<_i4.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) => + (super.noSuchMethod( + Invocation.method( + #findExercisesByVariationId, + [variationId], + {#exerciseIdToExclude: exerciseIdToExclude}, + ), + returnValue: <_i4.Exercise>[], + ) + as List<_i4.Exercise>); @override - _i18.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i5.ExerciseCategory findCategoryById(int? id) => + (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeExerciseCategory_3(this, Invocation.method(#findCategoryById, [id])), + ) + as _i5.ExerciseCategory); @override - _i18.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i6.Equipment findEquipmentById(int? id) => + (super.noSuchMethod( + Invocation.method(#findEquipmentById, [id]), + returnValue: _FakeEquipment_4(this, Invocation.method(#findEquipmentById, [id])), + ) + as _i6.Equipment); @override - _i18.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i7.Muscle findMuscleById(int? id) => + (super.noSuchMethod( + Invocation.method(#findMuscleById, [id]), + returnValue: _FakeMuscle_5(this, Invocation.method(#findMuscleById, [id])), + ) + as _i7.Muscle); @override - _i18.Future fetchAndSetAllExercises() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllExercises, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i8.Language findLanguageById(int? id) => + (super.noSuchMethod( + Invocation.method(#findLanguageById, [id]), + returnValue: _FakeLanguage_6(this, Invocation.method(#findLanguageById, [id])), + ) + as _i8.Language); @override - _i18.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i18.Future<_i4.Exercise?>.value(), - ) as _i18.Future<_i4.Exercise?>); + _i18.Future fetchAndSetCategoriesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future fetchAndSetMusclesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future fetchAndSetEquipmentsFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future fetchAndSetLanguagesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future fetchAndSetAllExercises() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllExercises, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i18.Future<_i4.Exercise?>.value(), + ) + as _i18.Future<_i4.Exercise?>); @override _i18.Future<_i4.Exercise> handleUpdateExerciseFromApi( @@ -515,55 +339,42 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i18.Future<_i4.Exercise>.value(_FakeExercise_2( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - )), - ) as _i18.Future<_i4.Exercise>); + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + returnValue: _i18.Future<_i4.Exercise>.value( + _FakeExercise_2( + this, + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + ), + ), + ) + as _i18.Future<_i4.Exercise>); @override - _i18.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => + (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future clearAllCachesAndPrefs() => + (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future fetchAndSetInitialData() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override _i18.Future setExercisesFromDatabase( @@ -571,64 +382,60 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { bool? forceDeleteCache = false, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesFromDatabase, - [database], - {#forceDeleteCache: forceDeleteCache}, - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method( + #setExercisesFromDatabase, + [database], + {#forceDeleteCache: forceDeleteCache}, + ), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future updateExerciseCache(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override _i18.Future> searchExercise( @@ -637,52 +444,34 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchExercise, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i18.Future>.value(<_i4.Exercise>[]), - ) as _i18.Future>); + Invocation.method( + #searchExercise, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i18.Future>.value(<_i4.Exercise>[]), + ) + as _i18.Future>); @override void addListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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]. @@ -694,268 +483,181 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); - - @override - _i9.IngredientDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeIngredientDatabase_7( - this, - Invocation.getter(#database), - ), - ) as _i9.IngredientDatabase); - - @override - List<_i13.Ingredient> get ingredients => (super.noSuchMethod( - Invocation.getter(#ingredients), - returnValue: <_i13.Ingredient>[], - ) as List<_i13.Ingredient>); - - @override - List<_i10.NutritionalPlan> get items => (super.noSuchMethod( - Invocation.getter(#items), - returnValue: <_i10.NutritionalPlan>[], - ) as List<_i10.NutritionalPlan>); - - @override - set database(_i9.IngredientDatabase? value) => super.noSuchMethod( - Invocation.setter( - #database, - value, - ), - returnValueForMissingStub: null, - ); - - @override - set ingredients(List<_i13.Ingredient>? value) => super.noSuchMethod( - Invocation.setter( - #ingredients, - 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, - ); - - @override - _i10.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeNutritionalPlan_8( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i10.NutritionalPlan); - - @override - _i11.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i11.Meal?); - - @override - _i18.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future<_i10.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - )), - ) as _i18.Future<_i10.NutritionalPlan>); - - @override - _i18.Future<_i10.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - )), - ) as _i18.Future<_i10.NutritionalPlan>); - - @override - _i18.Future<_i10.NutritionalPlan> addPlan(_i10.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], - ), - returnValue: _i18.Future<_i10.NutritionalPlan>.value(_FakeNutritionalPlan_8( - this, - Invocation.method( - #addPlan, - [planData], - ), - )), - ) as _i18.Future<_i10.NutritionalPlan>); - - @override - _i18.Future editPlan(_i10.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future<_i11.Meal> addMeal( - _i11.Meal? meal, - int? planId, - ) => + _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - returnValue: _i18.Future<_i11.Meal>.value(_FakeMeal_9( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - )), - ) as _i18.Future<_i11.Meal>); + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i18.Future<_i11.Meal> editMeal(_i11.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], - ), - returnValue: _i18.Future<_i11.Meal>.value(_FakeMeal_9( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), - ) as _i18.Future<_i11.Meal>); - - @override - _i18.Future deleteMeal(_i11.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future<_i12.MealItem> addMealItem( - _i12.MealItem? mealItem, - _i11.Meal? meal, - ) => + _i9.IngredientDatabase get database => (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i18.Future<_i12.MealItem>.value(_FakeMealItem_10( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - )), - ) as _i18.Future<_i12.MealItem>); + Invocation.getter(#database), + returnValue: _FakeIngredientDatabase_7(this, Invocation.getter(#database)), + ) + as _i9.IngredientDatabase); @override - _i18.Future deleteMealItem(_i12.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + List<_i13.Ingredient> get ingredients => + (super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i13.Ingredient>[]) + as List<_i13.Ingredient>); @override - _i18.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + List<_i10.NutritionalPlan> get items => + (super.noSuchMethod(Invocation.getter(#items), returnValue: <_i10.NutritionalPlan>[]) + as List<_i10.NutritionalPlan>); + + @override + set database(_i9.IngredientDatabase? value) => + super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null); + + @override + set ingredients(List<_i13.Ingredient>? value) => + super.noSuchMethod(Invocation.setter(#ingredients, 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); + + @override + _i10.NutritionalPlan findById(int? id) => + (super.noSuchMethod( + Invocation.method(#findById, [id]), + returnValue: _FakeNutritionalPlan_8(this, Invocation.method(#findById, [id])), + ) + as _i10.NutritionalPlan); + + @override + _i11.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i11.Meal?); + + @override + _i18.Future fetchAndSetAllPlansSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansSparse, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future fetchAndSetAllPlansFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansFull, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future<_i10.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i18.Future<_i10.NutritionalPlan>.value( + _FakeNutritionalPlan_8(this, Invocation.method(#fetchAndSetPlanSparse, [planId])), + ), + ) + as _i18.Future<_i10.NutritionalPlan>); + + @override + _i18.Future<_i10.NutritionalPlan> fetchAndSetPlanFull(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i18.Future<_i10.NutritionalPlan>.value( + _FakeNutritionalPlan_8(this, Invocation.method(#fetchAndSetPlanFull, [planId])), + ), + ) + as _i18.Future<_i10.NutritionalPlan>); + + @override + _i18.Future<_i10.NutritionalPlan> addPlan(_i10.NutritionalPlan? planData) => + (super.noSuchMethod( + Invocation.method(#addPlan, [planData]), + returnValue: _i18.Future<_i10.NutritionalPlan>.value( + _FakeNutritionalPlan_8(this, Invocation.method(#addPlan, [planData])), + ), + ) + as _i18.Future<_i10.NutritionalPlan>); + + @override + _i18.Future editPlan(_i10.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#editPlan, [plan]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future deletePlan(int? id) => + (super.noSuchMethod( + Invocation.method(#deletePlan, [id]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future<_i11.Meal> addMeal(_i11.Meal? meal, int? planId) => + (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i18.Future<_i11.Meal>.value( + _FakeMeal_9(this, Invocation.method(#addMeal, [meal, planId])), + ), + ) + as _i18.Future<_i11.Meal>); + + @override + _i18.Future<_i11.Meal> editMeal(_i11.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#editMeal, [meal]), + returnValue: _i18.Future<_i11.Meal>.value( + _FakeMeal_9(this, Invocation.method(#editMeal, [meal])), + ), + ) + as _i18.Future<_i11.Meal>); + + @override + _i18.Future deleteMeal(_i11.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#deleteMeal, [meal]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future<_i12.MealItem> addMealItem(_i12.MealItem? mealItem, _i11.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i18.Future<_i12.MealItem>.value( + _FakeMealItem_10(this, Invocation.method(#addMealItem, [mealItem, meal])), + ), + ) + as _i18.Future<_i12.MealItem>); + + @override + _i18.Future deleteMealItem(_i12.MealItem? mealItem) => + (super.noSuchMethod( + Invocation.method(#deleteMealItem, [mealItem]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future clearIngredientCache() => + (super.noSuchMethod( + Invocation.method(#clearIngredientCache, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override _i18.Future<_i13.Ingredient> fetchIngredient( @@ -963,30 +665,24 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans _i9.IngredientDatabase? database, }) => (super.noSuchMethod( - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - returnValue: _i18.Future<_i13.Ingredient>.value(_FakeIngredient_11( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - )), - ) as _i18.Future<_i13.Ingredient>); + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + returnValue: _i18.Future<_i13.Ingredient>.value( + _FakeIngredient_11( + this, + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + ), + ), + ) + as _i18.Future<_i13.Ingredient>); @override - _i18.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future fetchIngredientsFromCache() => + (super.noSuchMethod( + Invocation.method(#fetchIngredientsFromCache, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override _i18.Future> searchIngredient( @@ -995,42 +691,31 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchIngredient, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i18.Future>.value(<_i13.Ingredient>[]), - ) as _i18.Future>); + Invocation.method( + #searchIngredient, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i18.Future>.value(<_i13.Ingredient>[]), + ) + as _i18.Future>); @override - _i18.Future<_i13.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithBarcode, - [barcode], - ), - returnValue: _i18.Future<_i13.Ingredient?>.value(), - ) as _i18.Future<_i13.Ingredient?>); - - @override - _i18.Future logMealToDiary( - _i11.Meal? meal, - DateTime? mealDateTime, - ) => + _i18.Future<_i13.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [ - meal, - mealDateTime, - ], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method(#searchIngredientWithBarcode, [barcode]), + returnValue: _i18.Future<_i13.Ingredient?>.value(), + ) + as _i18.Future<_i13.Ingredient?>); + + @override + _i18.Future logMealToDiary(_i11.Meal? meal, DateTime? mealDateTime) => + (super.noSuchMethod( + Invocation.method(#logMealToDiary, [meal, mealDateTime]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override _i18.Future logIngredientToDiary( @@ -1039,80 +724,49 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future deleteLog( - int? logId, - int? planId, - ) => + _i18.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method(#deleteLog, [logId, planId]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future fetchAndSetLogs(_i10.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future fetchAndSetLogs(_i10.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLogs, [plan]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override void addListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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]. @@ -1124,145 +778,96 @@ class MockUserProvider extends _i1.Mock implements _i21.UserProvider { } @override - _i22.ThemeMode get themeMode => (super.noSuchMethod( - Invocation.getter(#themeMode), - returnValue: _i22.ThemeMode.system, - ) as _i22.ThemeMode); + _i22.ThemeMode get themeMode => + (super.noSuchMethod(Invocation.getter(#themeMode), returnValue: _i22.ThemeMode.system) + as _i22.ThemeMode); @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i14.SharedPreferencesAsync get prefs => (super.noSuchMethod( - Invocation.getter(#prefs), - returnValue: _FakeSharedPreferencesAsync_12( - this, - Invocation.getter(#prefs), - ), - ) as _i14.SharedPreferencesAsync); + _i14.SharedPreferencesAsync get prefs => + (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakeSharedPreferencesAsync_12(this, Invocation.getter(#prefs)), + ) + as _i14.SharedPreferencesAsync); @override - set themeMode(_i22.ThemeMode? value) => super.noSuchMethod( - Invocation.setter( - #themeMode, - value, - ), - returnValueForMissingStub: null, - ); + set themeMode(_i22.ThemeMode? value) => + super.noSuchMethod(Invocation.setter(#themeMode, value), returnValueForMissingStub: null); @override - set prefs(_i14.SharedPreferencesAsync? value) => super.noSuchMethod( - Invocation.setter( - #prefs, - value, - ), - returnValueForMissingStub: null, - ); + set prefs(_i14.SharedPreferencesAsync? value) => + super.noSuchMethod(Invocation.setter(#prefs, value), returnValueForMissingStub: null); @override - set profile(_i23.Profile? value) => super.noSuchMethod( - Invocation.setter( - #profile, - value, - ), - returnValueForMissingStub: null, - ); + set profile(_i23.Profile? value) => + super.noSuchMethod(Invocation.setter(#profile, value), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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(_i22.ThemeMode? mode) => super.noSuchMethod( - Invocation.method( - #setThemeMode, - [mode], - ), - returnValueForMissingStub: null, - ); + void setThemeMode(_i22.ThemeMode? mode) => + super.noSuchMethod(Invocation.method(#setThemeMode, [mode]), returnValueForMissingStub: null); @override - _i18.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetProfile, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future fetchAndSetProfile() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetProfile, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future saveProfile() => (super.noSuchMethod( - Invocation.method( - #saveProfile, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future saveProfile() => + (super.noSuchMethod( + Invocation.method(#saveProfile, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future verifyEmail() => (super.noSuchMethod( - Invocation.method( - #verifyEmail, - [], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future verifyEmail() => + (super.noSuchMethod( + Invocation.method(#verifyEmail, []), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); @override void addListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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]. @@ -1274,156 +879,97 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { } @override - _i15.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_13( - this, - Invocation.getter(#auth), - ), - ) as _i15.AuthProvider); - - @override - _i16.Client get client => (super.noSuchMethod( - Invocation.getter(#client), - returnValue: _FakeClient_14( - this, - Invocation.getter(#client), - ), - ) as _i16.Client); - - @override - set auth(_i15.AuthProvider? value) => super.noSuchMethod( - Invocation.setter( - #auth, - value, - ), - returnValueForMissingStub: null, - ); - - @override - set client(_i16.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i15.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_15( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_13(this, Invocation.getter(#auth)), + ) + as _i15.AuthProvider); @override - _i18.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i18.Future>.value([]), - ) as _i18.Future>); - - @override - _i18.Future> post( - Map? data, - Uri? uri, - ) => + _i16.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i18.Future>.value({}), - ) as _i18.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_14(this, Invocation.getter(#client)), + ) + as _i16.Client); @override - _i18.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i18.Future>.value({}), - ) as _i18.Future>); + set auth(_i15.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i18.Future<_i16.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i16.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i18.Future<_i16.Response>.value(_FakeResponse_16( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i18.Future<_i16.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_15( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i18.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i18.Future>.value([]), + ) + as _i18.Future>); + + @override + _i18.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i18.Future>.value({}), + ) + as _i18.Future>); + + @override + _i18.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i18.Future>.value({}), + ) + as _i18.Future>); + + @override + _i18.Future<_i16.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i18.Future<_i16.Response>.value( + _FakeResponse_16(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i18.Future<_i16.Response>); } /// A class which mocks [SharedPreferencesAsync]. @@ -1436,182 +982,126 @@ class MockSharedPreferencesAsync extends _i1.Mock implements _i14.SharedPreferen } @override - _i18.Future> getKeys({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #getKeys, - [], - {#allowList: allowList}, - ), - returnValue: _i18.Future>.value({}), - ) as _i18.Future>); - - @override - _i18.Future> getAll({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #getAll, - [], - {#allowList: allowList}, - ), - returnValue: _i18.Future>.value({}), - ) as _i18.Future>); - - @override - _i18.Future getBool(String? key) => (super.noSuchMethod( - Invocation.method( - #getBool, - [key], - ), - returnValue: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future getInt(String? key) => (super.noSuchMethod( - Invocation.method( - #getInt, - [key], - ), - returnValue: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future getDouble(String? key) => (super.noSuchMethod( - Invocation.method( - #getDouble, - [key], - ), - returnValue: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future getString(String? key) => (super.noSuchMethod( - Invocation.method( - #getString, - [key], - ), - returnValue: _i18.Future.value(), - ) as _i18.Future); - - @override - _i18.Future?> getStringList(String? key) => (super.noSuchMethod( - Invocation.method( - #getStringList, - [key], - ), - returnValue: _i18.Future?>.value(), - ) as _i18.Future?>); - - @override - _i18.Future containsKey(String? key) => (super.noSuchMethod( - Invocation.method( - #containsKey, - [key], - ), - returnValue: _i18.Future.value(false), - ) as _i18.Future); - - @override - _i18.Future setBool( - String? key, - bool? value, - ) => + _i18.Future> getKeys({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #setBool, - [ - key, - value, - ], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method(#getKeys, [], {#allowList: allowList}), + returnValue: _i18.Future>.value({}), + ) + as _i18.Future>); @override - _i18.Future setInt( - String? key, - int? value, - ) => + _i18.Future> getAll({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #setInt, - [ - key, - value, - ], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method(#getAll, [], {#allowList: allowList}), + returnValue: _i18.Future>.value({}), + ) + as _i18.Future>); @override - _i18.Future setDouble( - String? key, - double? value, - ) => + _i18.Future getBool(String? key) => (super.noSuchMethod( - Invocation.method( - #setDouble, - [ - key, - value, - ], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method(#getBool, [key]), + returnValue: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future setString( - String? key, - String? value, - ) => + _i18.Future getInt(String? key) => + (super.noSuchMethod(Invocation.method(#getInt, [key]), returnValue: _i18.Future.value()) + as _i18.Future); + + @override + _i18.Future getDouble(String? key) => (super.noSuchMethod( - Invocation.method( - #setString, - [ - key, - value, - ], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method(#getDouble, [key]), + returnValue: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future setStringList( - String? key, - List? value, - ) => + _i18.Future getString(String? key) => (super.noSuchMethod( - Invocation.method( - #setStringList, - [ - key, - value, - ], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + Invocation.method(#getString, [key]), + returnValue: _i18.Future.value(), + ) + as _i18.Future); @override - _i18.Future remove(String? key) => (super.noSuchMethod( - Invocation.method( - #remove, - [key], - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future?> getStringList(String? key) => + (super.noSuchMethod( + Invocation.method(#getStringList, [key]), + returnValue: _i18.Future?>.value(), + ) + as _i18.Future?>); @override - _i18.Future clear({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #clear, - [], - {#allowList: allowList}, - ), - returnValue: _i18.Future.value(), - returnValueForMissingStub: _i18.Future.value(), - ) as _i18.Future); + _i18.Future containsKey(String? key) => + (super.noSuchMethod( + Invocation.method(#containsKey, [key]), + returnValue: _i18.Future.value(false), + ) + as _i18.Future); + + @override + _i18.Future setBool(String? key, bool? value) => + (super.noSuchMethod( + Invocation.method(#setBool, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future setInt(String? key, int? value) => + (super.noSuchMethod( + Invocation.method(#setInt, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future setDouble(String? key, double? value) => + (super.noSuchMethod( + Invocation.method(#setDouble, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future setString(String? key, String? value) => + (super.noSuchMethod( + Invocation.method(#setString, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future setStringList(String? key, List? value) => + (super.noSuchMethod( + Invocation.method(#setStringList, [key, value]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future remove(String? key) => + (super.noSuchMethod( + Invocation.method(#remove, [key]), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); + + @override + _i18.Future clear({Set? allowList}) => + (super.noSuchMethod( + Invocation.method(#clear, [], {#allowList: allowList}), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) + as _i18.Future); } diff --git a/test/exercises/contribute_exercise_test.mocks.dart b/test/exercises/contribute_exercise_test.mocks.dart index 25cee87e..0ad7e7b6 100644 --- a/test/exercises/contribute_exercise_test.mocks.dart +++ b/test/exercises/contribute_exercise_test.mocks.dart @@ -41,93 +41,43 @@ import 'package:wger/providers/user.dart' as _i17; // 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 _FakeVariation_1 extends _i1.SmartFake implements _i3.Variation { - _FakeVariation_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeVariation_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 _FakeExerciseDatabase_3 extends _i1.SmartFake implements _i5.ExerciseDatabase { - _FakeExerciseDatabase_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseDatabase_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_4 extends _i1.SmartFake implements _i6.Exercise { - _FakeExercise_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeExerciseCategory_5 extends _i1.SmartFake implements _i7.ExerciseCategory { - _FakeExerciseCategory_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseCategory_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEquipment_6 extends _i1.SmartFake implements _i8.Equipment { - _FakeEquipment_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEquipment_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMuscle_7 extends _i1.SmartFake implements _i9.Muscle { - _FakeMuscle_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMuscle_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeLanguage_8 extends _i1.SmartFake implements _i10.Language { - _FakeLanguage_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLanguage_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [AddExerciseProvider]. @@ -139,321 +89,218 @@ class MockAddExerciseProvider extends _i1.Mock implements _i11.AddExerciseProvid } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - List<_i12.File> get exerciseImages => (super.noSuchMethod( - Invocation.getter(#exerciseImages), - returnValue: <_i12.File>[], - ) as List<_i12.File>); + List<_i12.File> get exerciseImages => + (super.noSuchMethod(Invocation.getter(#exerciseImages), returnValue: <_i12.File>[]) + as List<_i12.File>); @override - List get alternateNamesEn => (super.noSuchMethod( - Invocation.getter(#alternateNamesEn), - returnValue: [], - ) as List); + List get alternateNamesEn => + (super.noSuchMethod(Invocation.getter(#alternateNamesEn), returnValue: []) + as List); @override - List get alternateNamesTrans => (super.noSuchMethod( - Invocation.getter(#alternateNamesTrans), - returnValue: [], - ) as List); + List get alternateNamesTrans => + (super.noSuchMethod(Invocation.getter(#alternateNamesTrans), returnValue: []) + as List); @override - List<_i8.Equipment> get equipment => (super.noSuchMethod( - Invocation.getter(#equipment), - returnValue: <_i8.Equipment>[], - ) as List<_i8.Equipment>); + List<_i8.Equipment> get equipment => + (super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i8.Equipment>[]) + as List<_i8.Equipment>); @override - bool get newVariation => (super.noSuchMethod( - Invocation.getter(#newVariation), - returnValue: false, - ) as bool); + bool get newVariation => + (super.noSuchMethod(Invocation.getter(#newVariation), returnValue: false) as bool); @override - _i3.Variation get variation => (super.noSuchMethod( - Invocation.getter(#variation), - returnValue: _FakeVariation_1( - this, - Invocation.getter(#variation), - ), - ) as _i3.Variation); + _i3.Variation get variation => + (super.noSuchMethod( + Invocation.getter(#variation), + returnValue: _FakeVariation_1(this, Invocation.getter(#variation)), + ) + as _i3.Variation); @override - List<_i9.Muscle> get primaryMuscles => (super.noSuchMethod( - Invocation.getter(#primaryMuscles), - returnValue: <_i9.Muscle>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get primaryMuscles => + (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>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get secondaryMuscles => + (super.noSuchMethod(Invocation.getter(#secondaryMuscles), returnValue: <_i9.Muscle>[]) + as List<_i9.Muscle>); @override - _i13.ExerciseSubmissionApi get exerciseApiObject => (super.noSuchMethod( - Invocation.getter(#exerciseApiObject), - returnValue: _i14.dummyValue<_i13.ExerciseSubmissionApi>( - this, - Invocation.getter(#exerciseApiObject), - ), - ) as _i13.ExerciseSubmissionApi); + _i13.ExerciseSubmissionApi get exerciseApiObject => + (super.noSuchMethod( + Invocation.getter(#exerciseApiObject), + returnValue: _i14.dummyValue<_i13.ExerciseSubmissionApi>( + this, + Invocation.getter(#exerciseApiObject), + ), + ) + as _i13.ExerciseSubmissionApi); @override set exerciseNameEn(String? value) => super.noSuchMethod( - Invocation.setter( - #exerciseNameEn, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#exerciseNameEn, value), + returnValueForMissingStub: null, + ); @override set exerciseNameTrans(String? value) => super.noSuchMethod( - Invocation.setter( - #exerciseNameTrans, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#exerciseNameTrans, value), + returnValueForMissingStub: null, + ); @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( - Invocation.setter( - #descriptionTrans, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#descriptionTrans, value), + returnValueForMissingStub: null, + ); @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( - Invocation.setter( - #languageTranslation, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#languageTranslation, value), + returnValueForMissingStub: null, + ); @override set alternateNamesEn(List? value) => super.noSuchMethod( - Invocation.setter( - #alternateNamesEn, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#alternateNamesEn, value), + returnValueForMissingStub: null, + ); @override set alternateNamesTrans(List? value) => super.noSuchMethod( - Invocation.setter( - #alternateNamesTrans, - value, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#alternateNamesTrans, value), + returnValueForMissingStub: null, + ); @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 newVariationForExercise(int? value) => super.noSuchMethod( - Invocation.setter( - #newVariationForExercise, - value, - ), - returnValueForMissingStub: null, - ); + set variationConnectToExercise(int? value) => super.noSuchMethod( + Invocation.setter(#variationConnectToExercise, value), + returnValueForMissingStub: null, + ); @override set variationId(int? variation) => super.noSuchMethod( - Invocation.setter( - #variationId, - variation, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#variationId, variation), + returnValueForMissingStub: null, + ); @override set primaryMuscles(List<_i9.Muscle>? muscles) => super.noSuchMethod( - Invocation.setter( - #primaryMuscles, - muscles, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#primaryMuscles, muscles), + returnValueForMissingStub: null, + ); @override set secondaryMuscles(List<_i9.Muscle>? muscles) => super.noSuchMethod( - Invocation.setter( - #secondaryMuscles, - muscles, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#secondaryMuscles, muscles), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 addExerciseImages(List<_i12.File>? exercises) => super.noSuchMethod( - Invocation.method( - #addExerciseImages, - [exercises], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addExerciseImages, [exercises]), + returnValueForMissingStub: null, + ); @override void removeExercise(String? path) => super.noSuchMethod( - Invocation.method( - #removeExercise, - [path], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeExercise, [path]), + returnValueForMissingStub: null, + ); @override - void printValues() => super.noSuchMethod( - Invocation.method( - #printValues, - [], - ), - returnValueForMissingStub: null, - ); + void printValues() => + super.noSuchMethod(Invocation.method(#printValues, []), returnValueForMissingStub: null); @override - _i15.Future addExercise() => (super.noSuchMethod( - Invocation.method( - #addExercise, - [], - ), - returnValue: _i15.Future.value(0), - ) as _i15.Future); - - @override - _i15.Future addExerciseSubmission() => (super.noSuchMethod( - Invocation.method( - #addExerciseSubmission, - [], - ), - returnValue: _i15.Future.value(0), - ) as _i15.Future); - - @override - _i15.Future addImages(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #addImages, - [exerciseId], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); - - @override - _i15.Future validateLanguage( - String? input, - String? languageCode, - ) => + _i15.Future addExercise() => (super.noSuchMethod( - Invocation.method( - #validateLanguage, - [ - input, - languageCode, - ], - ), - returnValue: _i15.Future.value(false), - ) as _i15.Future); + Invocation.method(#addExercise, []), + returnValue: _i15.Future.value(0), + ) + as _i15.Future); + + @override + _i15.Future addExerciseSubmission() => + (super.noSuchMethod( + Invocation.method(#addExerciseSubmission, []), + returnValue: _i15.Future.value(0), + ) + as _i15.Future); + + @override + _i15.Future addImages(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#addImages, [exerciseId]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future validateLanguage(String? input, String? languageCode) => + (super.noSuchMethod( + Invocation.method(#validateLanguage, [input, languageCode]), + returnValue: _i15.Future.value(false), + ) + as _i15.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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]. @@ -465,145 +312,96 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider { } @override - _i18.ThemeMode get themeMode => (super.noSuchMethod( - Invocation.getter(#themeMode), - returnValue: _i18.ThemeMode.system, - ) as _i18.ThemeMode); + _i18.ThemeMode get themeMode => + (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), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i4.SharedPreferencesAsync get prefs => (super.noSuchMethod( - Invocation.getter(#prefs), - returnValue: _FakeSharedPreferencesAsync_2( - this, - Invocation.getter(#prefs), - ), - ) as _i4.SharedPreferencesAsync); + _i4.SharedPreferencesAsync get prefs => + (super.noSuchMethod( + 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); + 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 fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetProfile, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetProfile() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetProfile, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future saveProfile() => (super.noSuchMethod( - Invocation.method( - #saveProfile, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future saveProfile() => + (super.noSuchMethod( + Invocation.method(#saveProfile, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future verifyEmail() => (super.noSuchMethod( - Invocation.method( - #verifyEmail, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future verifyEmail() => + (super.noSuchMethod( + Invocation.method(#verifyEmail, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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 [ExercisesProvider]. @@ -615,292 +413,211 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i5.ExerciseDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeExerciseDatabase_3( - this, - Invocation.getter(#database), - ), - ) as _i5.ExerciseDatabase); + _i5.ExerciseDatabase get database => + (super.noSuchMethod( + 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>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get exercises => + (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>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get filteredExercises => + (super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[]) + as List<_i6.Exercise>); @override - Map> get exerciseByVariation => (super.noSuchMethod( - Invocation.getter(#exerciseByVariation), - returnValue: >{}, - ) as Map>); + Map> get exerciseByVariation => + (super.noSuchMethod( + Invocation.getter(#exerciseByVariation), + returnValue: >{}, + ) + as Map>); @override - List<_i7.ExerciseCategory> get categories => (super.noSuchMethod( - Invocation.getter(#categories), - returnValue: <_i7.ExerciseCategory>[], - ) as List<_i7.ExerciseCategory>); + List<_i7.ExerciseCategory> get categories => + (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>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get muscles => + (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>[], - ) as List<_i8.Equipment>); + List<_i8.Equipment> get 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>[], - ) as List<_i10.Language>); + List<_i10.Language> get languages => + (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( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#filteredExercises, newFilteredExercises), + returnValueForMissingStub: null, + ); @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 => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i15.Future setFilters(_i20.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); - - @override - void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i15.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); - - @override - 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], - ), - ), - ) as _i6.Exercise); - - @override - List<_i6.Exercise> findExercisesByVariationId( - int? variationId, { - int? exerciseIdToExclude, - }) => + _i15.Future setFilters(_i20.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #findExercisesByVariationId, - [variationId], - {#exerciseIdToExclude: exerciseIdToExclude}, - ), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + Invocation.method(#setFilters, [newFilters]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i7.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeExerciseCategory_5( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i7.ExerciseCategory); + void initFilters() => + super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null); @override - _i8.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), - returnValue: _FakeEquipment_6( - this, - Invocation.method( - #findEquipmentById, - [id], - ), - ), - ) as _i8.Equipment); + _i15.Future findByFilters() => + (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i9.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), - returnValue: _FakeMuscle_7( - this, - Invocation.method( - #findMuscleById, - [id], - ), - ), - ) as _i9.Muscle); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i10.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), - returnValue: _FakeLanguage_8( - this, - Invocation.method( - #findLanguageById, - [id], - ), - ), - ) as _i10.Language); + _i6.Exercise findExerciseById(int? id) => + (super.noSuchMethod( + Invocation.method(#findExerciseById, [id]), + returnValue: _FakeExercise_4(this, Invocation.method(#findExerciseById, [id])), + ) + as _i6.Exercise); @override - _i15.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + List<_i6.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) => + (super.noSuchMethod( + Invocation.method( + #findExercisesByVariationId, + [variationId], + {#exerciseIdToExclude: exerciseIdToExclude}, + ), + returnValue: <_i6.Exercise>[], + ) + as List<_i6.Exercise>); @override - _i15.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i7.ExerciseCategory findCategoryById(int? id) => + (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeExerciseCategory_5(this, Invocation.method(#findCategoryById, [id])), + ) + as _i7.ExerciseCategory); @override - _i15.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i8.Equipment findEquipmentById(int? id) => + (super.noSuchMethod( + Invocation.method(#findEquipmentById, [id]), + returnValue: _FakeEquipment_6(this, Invocation.method(#findEquipmentById, [id])), + ) + as _i8.Equipment); @override - _i15.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i9.Muscle findMuscleById(int? id) => + (super.noSuchMethod( + Invocation.method(#findMuscleById, [id]), + returnValue: _FakeMuscle_7(this, Invocation.method(#findMuscleById, [id])), + ) + as _i9.Muscle); @override - _i15.Future fetchAndSetAllExercises() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllExercises, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i10.Language findLanguageById(int? id) => + (super.noSuchMethod( + Invocation.method(#findLanguageById, [id]), + returnValue: _FakeLanguage_8(this, Invocation.method(#findLanguageById, [id])), + ) + as _i10.Language); @override - _i15.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i15.Future<_i6.Exercise?>.value(), - ) as _i15.Future<_i6.Exercise?>); + _i15.Future fetchAndSetCategoriesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future fetchAndSetMusclesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future fetchAndSetEquipmentsFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future fetchAndSetLanguagesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future fetchAndSetAllExercises() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllExercises, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); + + @override + _i15.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i15.Future<_i6.Exercise?>.value(), + ) + as _i15.Future<_i6.Exercise?>); @override _i15.Future<_i6.Exercise> handleUpdateExerciseFromApi( @@ -908,55 +625,42 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i15.Future<_i6.Exercise>.value(_FakeExercise_4( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - )), - ) as _i15.Future<_i6.Exercise>); + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + returnValue: _i15.Future<_i6.Exercise>.value( + _FakeExercise_4( + this, + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + ), + ), + ) + as _i15.Future<_i6.Exercise>); @override - _i15.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => + (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future clearAllCachesAndPrefs() => + (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetInitialData() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override _i15.Future setExercisesFromDatabase( @@ -964,64 +668,60 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider { bool? forceDeleteCache = false, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesFromDatabase, - [database], - {#forceDeleteCache: forceDeleteCache}, - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + Invocation.method( + #setExercisesFromDatabase, + [database], + {#forceDeleteCache: forceDeleteCache}, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future updateExerciseCache(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override - _i15.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i15.Future.value(), - returnValueForMissingStub: _i15.Future.value(), - ) as _i15.Future); + _i15.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) + as _i15.Future); @override _i15.Future> searchExercise( @@ -1030,50 +730,32 @@ class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider { bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchExercise, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i15.Future>.value(<_i6.Exercise>[]), - ) as _i15.Future>); + Invocation.method( + #searchExercise, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i15.Future>.value(<_i6.Exercise>[]), + ) + as _i15.Future>); @override void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/exercises/exercises_detail_widget_test.mocks.dart b/test/exercises/exercises_detail_widget_test.mocks.dart index 425264a3..5c39de2b 100644 --- a/test/exercises/exercises_detail_widget_test.mocks.dart +++ b/test/exercises/exercises_detail_widget_test.mocks.dart @@ -32,73 +32,34 @@ import 'package:wger/providers/exercises.dart' as _i9; // 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 _FakeExerciseDatabase_1 extends _i1.SmartFake implements _i3.ExerciseDatabase { - _FakeExerciseDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseDatabase_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_2 extends _i1.SmartFake implements _i4.Exercise { - _FakeExercise_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeExerciseCategory_3 extends _i1.SmartFake implements _i5.ExerciseCategory { - _FakeExerciseCategory_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseCategory_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEquipment_4 extends _i1.SmartFake implements _i6.Equipment { - _FakeEquipment_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEquipment_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMuscle_5 extends _i1.SmartFake implements _i7.Muscle { - _FakeMuscle_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMuscle_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeLanguage_6 extends _i1.SmartFake implements _i8.Language { - _FakeLanguage_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLanguage_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [ExercisesProvider]. @@ -110,292 +71,211 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i3.ExerciseDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeExerciseDatabase_1( - this, - Invocation.getter(#database), - ), - ) as _i3.ExerciseDatabase); + _i3.ExerciseDatabase get database => + (super.noSuchMethod( + Invocation.getter(#database), + returnValue: _FakeExerciseDatabase_1(this, Invocation.getter(#database)), + ) + as _i3.ExerciseDatabase); @override - List<_i4.Exercise> get exercises => (super.noSuchMethod( - Invocation.getter(#exercises), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + List<_i4.Exercise> get exercises => + (super.noSuchMethod(Invocation.getter(#exercises), returnValue: <_i4.Exercise>[]) + as List<_i4.Exercise>); @override - List<_i4.Exercise> get filteredExercises => (super.noSuchMethod( - Invocation.getter(#filteredExercises), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + List<_i4.Exercise> get filteredExercises => + (super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i4.Exercise>[]) + as List<_i4.Exercise>); @override - Map> get exerciseByVariation => (super.noSuchMethod( - Invocation.getter(#exerciseByVariation), - returnValue: >{}, - ) as Map>); + Map> get exerciseByVariation => + (super.noSuchMethod( + Invocation.getter(#exerciseByVariation), + returnValue: >{}, + ) + as Map>); @override - List<_i5.ExerciseCategory> get categories => (super.noSuchMethod( - Invocation.getter(#categories), - returnValue: <_i5.ExerciseCategory>[], - ) as List<_i5.ExerciseCategory>); + List<_i5.ExerciseCategory> get categories => + (super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i5.ExerciseCategory>[]) + as List<_i5.ExerciseCategory>); @override - List<_i7.Muscle> get muscles => (super.noSuchMethod( - Invocation.getter(#muscles), - returnValue: <_i7.Muscle>[], - ) as List<_i7.Muscle>); + List<_i7.Muscle> get muscles => + (super.noSuchMethod(Invocation.getter(#muscles), returnValue: <_i7.Muscle>[]) + as List<_i7.Muscle>); @override - List<_i6.Equipment> get equipment => (super.noSuchMethod( - Invocation.getter(#equipment), - returnValue: <_i6.Equipment>[], - ) as List<_i6.Equipment>); + List<_i6.Equipment> get equipment => + (super.noSuchMethod(Invocation.getter(#equipment), returnValue: <_i6.Equipment>[]) + as List<_i6.Equipment>); @override - List<_i8.Language> get languages => (super.noSuchMethod( - Invocation.getter(#languages), - returnValue: <_i8.Language>[], - ) as List<_i8.Language>); + List<_i8.Language> get languages => + (super.noSuchMethod(Invocation.getter(#languages), returnValue: <_i8.Language>[]) + as List<_i8.Language>); @override - set database(_i3.ExerciseDatabase? value) => super.noSuchMethod( - Invocation.setter( - #database, - value, - ), - returnValueForMissingStub: null, - ); + set database(_i3.ExerciseDatabase? value) => + super.noSuchMethod(Invocation.setter(#database, value), returnValueForMissingStub: null); @override - set exercises(List<_i4.Exercise>? value) => super.noSuchMethod( - Invocation.setter( - #exercises, - value, - ), - returnValueForMissingStub: null, - ); + set exercises(List<_i4.Exercise>? value) => + super.noSuchMethod(Invocation.setter(#exercises, value), returnValueForMissingStub: null); @override set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#filteredExercises, newFilteredExercises), + returnValueForMissingStub: null, + ); @override - set languages(List<_i8.Language>? languages) => super.noSuchMethod( - Invocation.setter( - #languages, - languages, - ), - returnValueForMissingStub: null, - ); + set languages(List<_i8.Language>? languages) => + super.noSuchMethod(Invocation.setter(#languages, languages), returnValueForMissingStub: null); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i10.Future setFilters(_i9.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i10.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i4.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method( - #findExerciseById, - [id], - ), - returnValue: _FakeExercise_2( - this, - Invocation.method( - #findExerciseById, - [id], - ), - ), - ) as _i4.Exercise); - - @override - List<_i4.Exercise> findExercisesByVariationId( - int? variationId, { - int? exerciseIdToExclude, - }) => + _i10.Future setFilters(_i9.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #findExercisesByVariationId, - [variationId], - {#exerciseIdToExclude: exerciseIdToExclude}, - ), - returnValue: <_i4.Exercise>[], - ) as List<_i4.Exercise>); + Invocation.method(#setFilters, [newFilters]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i5.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeExerciseCategory_3( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i5.ExerciseCategory); + void initFilters() => + super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null); @override - _i6.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), - returnValue: _FakeEquipment_4( - this, - Invocation.method( - #findEquipmentById, - [id], - ), - ), - ) as _i6.Equipment); + _i10.Future findByFilters() => + (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i7.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), - returnValue: _FakeMuscle_5( - this, - Invocation.method( - #findMuscleById, - [id], - ), - ), - ) as _i7.Muscle); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i8.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), - returnValue: _FakeLanguage_6( - this, - Invocation.method( - #findLanguageById, - [id], - ), - ), - ) as _i8.Language); + _i4.Exercise findExerciseById(int? id) => + (super.noSuchMethod( + Invocation.method(#findExerciseById, [id]), + returnValue: _FakeExercise_2(this, Invocation.method(#findExerciseById, [id])), + ) + as _i4.Exercise); @override - _i10.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + List<_i4.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) => + (super.noSuchMethod( + Invocation.method( + #findExercisesByVariationId, + [variationId], + {#exerciseIdToExclude: exerciseIdToExclude}, + ), + returnValue: <_i4.Exercise>[], + ) + as List<_i4.Exercise>); @override - _i10.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i5.ExerciseCategory findCategoryById(int? id) => + (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeExerciseCategory_3(this, Invocation.method(#findCategoryById, [id])), + ) + as _i5.ExerciseCategory); @override - _i10.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i6.Equipment findEquipmentById(int? id) => + (super.noSuchMethod( + Invocation.method(#findEquipmentById, [id]), + returnValue: _FakeEquipment_4(this, Invocation.method(#findEquipmentById, [id])), + ) + as _i6.Equipment); @override - _i10.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i7.Muscle findMuscleById(int? id) => + (super.noSuchMethod( + Invocation.method(#findMuscleById, [id]), + returnValue: _FakeMuscle_5(this, Invocation.method(#findMuscleById, [id])), + ) + as _i7.Muscle); @override - _i10.Future fetchAndSetAllExercises() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllExercises, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i8.Language findLanguageById(int? id) => + (super.noSuchMethod( + Invocation.method(#findLanguageById, [id]), + returnValue: _FakeLanguage_6(this, Invocation.method(#findLanguageById, [id])), + ) + as _i8.Language); @override - _i10.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i10.Future<_i4.Exercise?>.value(), - ) as _i10.Future<_i4.Exercise?>); + _i10.Future fetchAndSetCategoriesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future fetchAndSetMusclesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future fetchAndSetEquipmentsFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future fetchAndSetLanguagesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future fetchAndSetAllExercises() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllExercises, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); + + @override + _i10.Future<_i4.Exercise?> fetchAndSetExercise(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i10.Future<_i4.Exercise?>.value(), + ) + as _i10.Future<_i4.Exercise?>); @override _i10.Future<_i4.Exercise> handleUpdateExerciseFromApi( @@ -403,55 +283,42 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i10.Future<_i4.Exercise>.value(_FakeExercise_2( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - )), - ) as _i10.Future<_i4.Exercise>); + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + returnValue: _i10.Future<_i4.Exercise>.value( + _FakeExercise_2( + this, + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + ), + ), + ) + as _i10.Future<_i4.Exercise>); @override - _i10.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => + (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future clearAllCachesAndPrefs() => + (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetInitialData() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future setExercisesFromDatabase( @@ -459,64 +326,60 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { bool? forceDeleteCache = false, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesFromDatabase, - [database], - {#forceDeleteCache: forceDeleteCache}, - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + Invocation.method( + #setExercisesFromDatabase, + [database], + {#forceDeleteCache: forceDeleteCache}, + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future updateExerciseCache(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetMuscles(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetCategories(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetLanguages(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override - _i10.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + _i10.Future fetchAndSetEquipments(_i3.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) + as _i10.Future); @override _i10.Future> searchExercise( @@ -525,50 +388,32 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchExercise, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i10.Future>.value(<_i4.Exercise>[]), - ) as _i10.Future>); + Invocation.method( + #searchExercise, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i10.Future>.value(<_i4.Exercise>[]), + ) + as _i10.Future>); @override void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/gallery/gallery_form_test.mocks.dart b/test/gallery/gallery_form_test.mocks.dart index 4d0a23b7..27d9e4a9 100644 --- a/test/gallery/gallery_form_test.mocks.dart +++ b/test/gallery/gallery_form_test.mocks.dart @@ -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]. @@ -77,274 +53,168 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { } @override - List<_i5.Image> get images => (super.noSuchMethod( - Invocation.getter(#images), - returnValue: <_i5.Image>[], - ) as List<_i5.Image>); + List<_i5.Image> get images => + (super.noSuchMethod(Invocation.getter(#images), returnValue: <_i5.Image>[]) + as List<_i5.Image>); @override - set images(List<_i5.Image>? 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), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - 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); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i6.Future fetchAndSetGallery() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetGallery, - [], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); - - @override - _i6.Future addImage( - _i5.Image? image, - _i7.XFile? imageFile, - ) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #addImage, - [ - image, - imageFile, - ], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i6.Future editImage( - _i5.Image? image, - _i7.XFile? imageFile, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #editImage, - [ - image, - imageFile, - ], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( - Invocation.method( - #deleteImage, - [image], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + + @override + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); + + @override + _i6.Future fetchAndSetGallery() => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.method(#fetchAndSetGallery, []), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i6.Future.value(), - ) as _i6.Future); - - @override - _i6.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); - - @override - _i6.Future> post( - Map? data, - Uri? uri, - ) => + _i6.Future addImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + Invocation.method(#addImage, [image, imageFile]), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future> patch( - Map? data, - Uri? uri, - ) => + _i6.Future editImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + Invocation.method(#editImage, [image, imageFile]), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i6.Future<_i3.Response>); + Invocation.method(#deleteImage, [image]), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => + (super.noSuchMethod( + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i6.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i6.Future.value(), + ) + as _i6.Future); + + @override + _i6.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i6.Future>.value([]), + ) + as _i6.Future>); + + @override + _i6.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i6.Future>.value({}), + ) + as _i6.Future>); + + @override + _i6.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i6.Future>.value({}), + ) + as _i6.Future>); + + @override + _i6.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i6.Future<_i3.Response>.value( + _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], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/gallery/gallery_screen_test.mocks.dart b/test/gallery/gallery_screen_test.mocks.dart index fe133b28..2d230b91 100644 --- a/test/gallery/gallery_screen_test.mocks.dart +++ b/test/gallery/gallery_screen_test.mocks.dart @@ -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]. @@ -77,274 +53,168 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { } @override - List<_i5.Image> get images => (super.noSuchMethod( - Invocation.getter(#images), - returnValue: <_i5.Image>[], - ) as List<_i5.Image>); + List<_i5.Image> get images => + (super.noSuchMethod(Invocation.getter(#images), returnValue: <_i5.Image>[]) + as List<_i5.Image>); @override - set images(List<_i5.Image>? 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), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - 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); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i6.Future fetchAndSetGallery() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetGallery, - [], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); - - @override - _i6.Future addImage( - _i5.Image? image, - _i7.XFile? imageFile, - ) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #addImage, - [ - image, - imageFile, - ], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i6.Future editImage( - _i5.Image? image, - _i7.XFile? imageFile, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #editImage, - [ - image, - imageFile, - ], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( - Invocation.method( - #deleteImage, - [image], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + + @override + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); + + @override + _i6.Future fetchAndSetGallery() => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.method(#fetchAndSetGallery, []), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i6.Future.value(), - ) as _i6.Future); - - @override - _i6.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); - - @override - _i6.Future> post( - Map? data, - Uri? uri, - ) => + _i6.Future addImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + Invocation.method(#addImage, [image, imageFile]), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future> patch( - Map? data, - Uri? uri, - ) => + _i6.Future editImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + Invocation.method(#editImage, [image, imageFile]), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - _i6.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i6.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i6.Future<_i3.Response>); + Invocation.method(#deleteImage, [image]), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => + (super.noSuchMethod( + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i6.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i6.Future.value(), + ) + as _i6.Future); + + @override + _i6.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i6.Future>.value([]), + ) + as _i6.Future>); + + @override + _i6.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i6.Future>.value({}), + ) + as _i6.Future>); + + @override + _i6.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i6.Future>.value({}), + ) + as _i6.Future>); + + @override + _i6.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i6.Future<_i3.Response>.value( + _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], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/measurements/measurement_categories_screen_test.mocks.dart b/test/measurements/measurement_categories_screen_test.mocks.dart index 3f6d6cdf..92778b41 100644 --- a/test/measurements/measurement_categories_screen_test.mocks.dart +++ b/test/measurements/measurement_categories_screen_test.mocks.dart @@ -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]. @@ -56,145 +46,108 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - 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>[], - ) as List<_i3.MeasurementCategory>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i3.MeasurementCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeMeasurementCategory_1( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i3.MeasurementCategory); - - @override - _i5.Future fetchAndSetCategories() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future fetchAndSetCategoryEntries(int? id) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoryEntries, - [id], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future fetchAndSetAllCategoriesAndEntries() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllCategoriesAndEntries, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future addCategory(_i3.MeasurementCategory? category) => (super.noSuchMethod( - Invocation.method( - #addCategory, - [category], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteCategory(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteCategory, - [id], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future editCategory( - int? id, - String? newName, - String? newUnit, - ) => + _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.method( - #editCategory, - [ - id, - newName, - newUnit, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i5.Future addEntry(_i6.MeasurementEntry? entry) => (super.noSuchMethod( - Invocation.method( - #addEntry, - [entry], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + List<_i3.MeasurementCategory> get categories => + (super.noSuchMethod(Invocation.getter(#categories), returnValue: <_i3.MeasurementCategory>[]) + as List<_i3.MeasurementCategory>); @override - _i5.Future deleteEntry( - int? id, - int? categoryId, - ) => + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + + @override + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); + + @override + _i3.MeasurementCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteEntry, - [ - id, - categoryId, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeMeasurementCategory_1( + this, + Invocation.method(#findCategoryById, [id]), + ), + ) + as _i3.MeasurementCategory); + + @override + _i5.Future fetchAndSetCategories() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future fetchAndSetCategoryEntries(int? id) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoryEntries, [id]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future fetchAndSetAllCategoriesAndEntries() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllCategoriesAndEntries, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future addCategory(_i3.MeasurementCategory? category) => + (super.noSuchMethod( + Invocation.method(#addCategory, [category]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future deleteCategory(int? id) => + (super.noSuchMethod( + Invocation.method(#deleteCategory, [id]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future editCategory(int? id, String? newName, String? newUnit) => + (super.noSuchMethod( + Invocation.method(#editCategory, [id, newName, newUnit]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future addEntry(_i6.MeasurementEntry? entry) => + (super.noSuchMethod( + Invocation.method(#addEntry, [entry]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future deleteEntry(int? id, int? categoryId) => + (super.noSuchMethod( + Invocation.method(#deleteEntry, [id, categoryId]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override _i5.Future editEntry( @@ -205,53 +158,29 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide DateTime? newDate, ) => (super.noSuchMethod( - Invocation.method( - #editEntry, - [ - id, - categoryId, - newValue, - newNotes, - newDate, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + Invocation.method(#editEntry, [id, categoryId, newValue, newNotes, newDate]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/measurements/measurement_provider_test.mocks.dart b/test/measurements/measurement_provider_test.mocks.dart index 99933704..4b890228 100644 --- a/test/measurements/measurement_provider_test.mocks.dart +++ b/test/measurements/measurement_provider_test.mocks.dart @@ -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]. @@ -74,154 +50,95 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i3.Response>); } diff --git a/test/nutrition/nutritional_meal_form_test.mocks.dart b/test/nutrition/nutritional_meal_form_test.mocks.dart index ef8ea874..9b9252c2 100644 --- a/test/nutrition/nutritional_meal_form_test.mocks.dart +++ b/test/nutrition/nutritional_meal_form_test.mocks.dart @@ -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]. @@ -99,268 +66,181 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); - - @override - _i3.IngredientDatabase get database => (super.noSuchMethod( - 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>[], - ) as List<_i7.Ingredient>); - - @override - List<_i4.NutritionalPlan> get items => (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, - ); - - @override - 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); - - @override - 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], - ), - ), - ) as _i4.NutritionalPlan); - - @override - _i5.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i5.Meal?); - - @override - _i9.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - )), - ) as _i9.Future<_i4.NutritionalPlan>); - - @override - _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - )), - ) as _i9.Future<_i4.NutritionalPlan>); - - @override - _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #addPlan, - [planData], - ), - )), - ) as _i9.Future<_i4.NutritionalPlan>); - - @override - _i9.Future editPlan(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future<_i5.Meal> addMeal( - _i5.Meal? meal, - int? planId, - ) => + _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - )), - ) as _i9.Future<_i5.Meal>); + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], - ), - returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), - ) as _i9.Future<_i5.Meal>); - - @override - _i9.Future deleteMeal(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future<_i6.MealItem> addMealItem( - _i6.MealItem? mealItem, - _i5.Meal? meal, - ) => + _i3.IngredientDatabase get database => (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i9.Future<_i6.MealItem>.value(_FakeMealItem_4( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - )), - ) as _i9.Future<_i6.MealItem>); + Invocation.getter(#database), + returnValue: _FakeIngredientDatabase_1(this, Invocation.getter(#database)), + ) + as _i3.IngredientDatabase); @override - _i9.Future deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + List<_i7.Ingredient> get ingredients => + (super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i7.Ingredient>[]) + as List<_i7.Ingredient>); @override - _i9.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + List<_i4.NutritionalPlan> get items => + (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); + + @override + 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); + + @override + 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])), + ) + as _i4.NutritionalPlan); + + @override + _i5.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?); + + @override + _i9.Future fetchAndSetAllPlansSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansSparse, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future fetchAndSetAllPlansFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansFull, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanSparse, [planId])), + ), + ) + as _i9.Future<_i4.NutritionalPlan>); + + @override + _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanFull, [planId])), + ), + ) + as _i9.Future<_i4.NutritionalPlan>); + + @override + _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => + (super.noSuchMethod( + Invocation.method(#addPlan, [planData]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2(this, Invocation.method(#addPlan, [planData])), + ), + ) + as _i9.Future<_i4.NutritionalPlan>); + + @override + _i9.Future editPlan(_i4.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#editPlan, [plan]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future deletePlan(int? id) => + (super.noSuchMethod( + Invocation.method(#deletePlan, [id]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) => + (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i9.Future<_i5.Meal>.value( + _FakeMeal_3(this, Invocation.method(#addMeal, [meal, planId])), + ), + ) + as _i9.Future<_i5.Meal>); + + @override + _i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#editMeal, [meal]), + returnValue: _i9.Future<_i5.Meal>.value( + _FakeMeal_3(this, Invocation.method(#editMeal, [meal])), + ), + ) + as _i9.Future<_i5.Meal>); + + @override + _i9.Future deleteMeal(_i5.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#deleteMeal, [meal]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future<_i6.MealItem> addMealItem(_i6.MealItem? mealItem, _i5.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i9.Future<_i6.MealItem>.value( + _FakeMealItem_4(this, Invocation.method(#addMealItem, [mealItem, meal])), + ), + ) + as _i9.Future<_i6.MealItem>); + + @override + _i9.Future deleteMealItem(_i6.MealItem? mealItem) => + (super.noSuchMethod( + Invocation.method(#deleteMealItem, [mealItem]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future clearIngredientCache() => + (super.noSuchMethod( + Invocation.method(#clearIngredientCache, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future<_i7.Ingredient> fetchIngredient( @@ -368,30 +248,24 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP _i3.IngredientDatabase? database, }) => (super.noSuchMethod( - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - returnValue: _i9.Future<_i7.Ingredient>.value(_FakeIngredient_5( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - )), - ) as _i9.Future<_i7.Ingredient>); + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + returnValue: _i9.Future<_i7.Ingredient>.value( + _FakeIngredient_5( + this, + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + ), + ), + ) + as _i9.Future<_i7.Ingredient>); @override - _i9.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future fetchIngredientsFromCache() => + (super.noSuchMethod( + Invocation.method(#fetchIngredientsFromCache, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future> searchIngredient( @@ -400,42 +274,31 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchIngredient, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i9.Future>.value(<_i7.Ingredient>[]), - ) as _i9.Future>); + Invocation.method( + #searchIngredient, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i9.Future>.value(<_i7.Ingredient>[]), + ) + as _i9.Future>); @override - _i9.Future<_i7.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithBarcode, - [barcode], - ), - returnValue: _i9.Future<_i7.Ingredient?>.value(), - ) as _i9.Future<_i7.Ingredient?>); - - @override - _i9.Future logMealToDiary( - _i5.Meal? meal, - DateTime? mealDateTime, - ) => + _i9.Future<_i7.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [ - meal, - mealDateTime, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#searchIngredientWithBarcode, [barcode]), + returnValue: _i9.Future<_i7.Ingredient?>.value(), + ) + as _i9.Future<_i7.Ingredient?>); + + @override + _i9.Future logMealToDiary(_i5.Meal? meal, DateTime? mealDateTime) => + (super.noSuchMethod( + Invocation.method(#logMealToDiary, [meal, mealDateTime]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future logIngredientToDiary( @@ -444,78 +307,47 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future deleteLog( - int? logId, - int? planId, - ) => + _i9.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#deleteLog, [logId, planId]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLogs, [plan]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/nutrition/nutritional_plan_form_test.mocks.dart b/test/nutrition/nutritional_plan_form_test.mocks.dart index 5d42b480..801f58c3 100644 --- a/test/nutrition/nutritional_plan_form_test.mocks.dart +++ b/test/nutrition/nutritional_plan_form_test.mocks.dart @@ -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]. @@ -99,268 +66,181 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); - - @override - _i3.IngredientDatabase get database => (super.noSuchMethod( - 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>[], - ) as List<_i7.Ingredient>); - - @override - List<_i4.NutritionalPlan> get items => (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, - ); - - @override - 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); - - @override - 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], - ), - ), - ) as _i4.NutritionalPlan); - - @override - _i5.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i5.Meal?); - - @override - _i9.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - )), - ) as _i9.Future<_i4.NutritionalPlan>); - - @override - _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - )), - ) as _i9.Future<_i4.NutritionalPlan>); - - @override - _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], - ), - returnValue: _i9.Future<_i4.NutritionalPlan>.value(_FakeNutritionalPlan_2( - this, - Invocation.method( - #addPlan, - [planData], - ), - )), - ) as _i9.Future<_i4.NutritionalPlan>); - - @override - _i9.Future editPlan(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future<_i5.Meal> addMeal( - _i5.Meal? meal, - int? planId, - ) => + _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - )), - ) as _i9.Future<_i5.Meal>); + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], - ), - returnValue: _i9.Future<_i5.Meal>.value(_FakeMeal_3( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), - ) as _i9.Future<_i5.Meal>); - - @override - _i9.Future deleteMeal(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future<_i6.MealItem> addMealItem( - _i6.MealItem? mealItem, - _i5.Meal? meal, - ) => + _i3.IngredientDatabase get database => (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i9.Future<_i6.MealItem>.value(_FakeMealItem_4( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - )), - ) as _i9.Future<_i6.MealItem>); + Invocation.getter(#database), + returnValue: _FakeIngredientDatabase_1(this, Invocation.getter(#database)), + ) + as _i3.IngredientDatabase); @override - _i9.Future deleteMealItem(_i6.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + List<_i7.Ingredient> get ingredients => + (super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i7.Ingredient>[]) + as List<_i7.Ingredient>); @override - _i9.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + List<_i4.NutritionalPlan> get items => + (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); + + @override + 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); + + @override + 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])), + ) + as _i4.NutritionalPlan); + + @override + _i5.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?); + + @override + _i9.Future fetchAndSetAllPlansSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansSparse, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future fetchAndSetAllPlansFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansFull, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanSparse, [planId])), + ), + ) + as _i9.Future<_i4.NutritionalPlan>); + + @override + _i9.Future<_i4.NutritionalPlan> fetchAndSetPlanFull(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2(this, Invocation.method(#fetchAndSetPlanFull, [planId])), + ), + ) + as _i9.Future<_i4.NutritionalPlan>); + + @override + _i9.Future<_i4.NutritionalPlan> addPlan(_i4.NutritionalPlan? planData) => + (super.noSuchMethod( + Invocation.method(#addPlan, [planData]), + returnValue: _i9.Future<_i4.NutritionalPlan>.value( + _FakeNutritionalPlan_2(this, Invocation.method(#addPlan, [planData])), + ), + ) + as _i9.Future<_i4.NutritionalPlan>); + + @override + _i9.Future editPlan(_i4.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#editPlan, [plan]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future deletePlan(int? id) => + (super.noSuchMethod( + Invocation.method(#deletePlan, [id]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future<_i5.Meal> addMeal(_i5.Meal? meal, int? planId) => + (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i9.Future<_i5.Meal>.value( + _FakeMeal_3(this, Invocation.method(#addMeal, [meal, planId])), + ), + ) + as _i9.Future<_i5.Meal>); + + @override + _i9.Future<_i5.Meal> editMeal(_i5.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#editMeal, [meal]), + returnValue: _i9.Future<_i5.Meal>.value( + _FakeMeal_3(this, Invocation.method(#editMeal, [meal])), + ), + ) + as _i9.Future<_i5.Meal>); + + @override + _i9.Future deleteMeal(_i5.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#deleteMeal, [meal]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future<_i6.MealItem> addMealItem(_i6.MealItem? mealItem, _i5.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i9.Future<_i6.MealItem>.value( + _FakeMealItem_4(this, Invocation.method(#addMealItem, [mealItem, meal])), + ), + ) + as _i9.Future<_i6.MealItem>); + + @override + _i9.Future deleteMealItem(_i6.MealItem? mealItem) => + (super.noSuchMethod( + Invocation.method(#deleteMealItem, [mealItem]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.Future clearIngredientCache() => + (super.noSuchMethod( + Invocation.method(#clearIngredientCache, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future<_i7.Ingredient> fetchIngredient( @@ -368,30 +248,24 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP _i3.IngredientDatabase? database, }) => (super.noSuchMethod( - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - returnValue: _i9.Future<_i7.Ingredient>.value(_FakeIngredient_5( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - )), - ) as _i9.Future<_i7.Ingredient>); + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + returnValue: _i9.Future<_i7.Ingredient>.value( + _FakeIngredient_5( + this, + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + ), + ), + ) + as _i9.Future<_i7.Ingredient>); @override - _i9.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future fetchIngredientsFromCache() => + (super.noSuchMethod( + Invocation.method(#fetchIngredientsFromCache, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future> searchIngredient( @@ -400,42 +274,31 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchIngredient, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i9.Future>.value(<_i7.Ingredient>[]), - ) as _i9.Future>); + Invocation.method( + #searchIngredient, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i9.Future>.value(<_i7.Ingredient>[]), + ) + as _i9.Future>); @override - _i9.Future<_i7.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithBarcode, - [barcode], - ), - returnValue: _i9.Future<_i7.Ingredient?>.value(), - ) as _i9.Future<_i7.Ingredient?>); - - @override - _i9.Future logMealToDiary( - _i5.Meal? meal, - DateTime? mealDateTime, - ) => + _i9.Future<_i7.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [ - meal, - mealDateTime, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#searchIngredientWithBarcode, [barcode]), + returnValue: _i9.Future<_i7.Ingredient?>.value(), + ) + as _i9.Future<_i7.Ingredient?>); + + @override + _i9.Future logMealToDiary(_i5.Meal? meal, DateTime? mealDateTime) => + (super.noSuchMethod( + Invocation.method(#logMealToDiary, [meal, mealDateTime]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future logIngredientToDiary( @@ -444,78 +307,47 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future deleteLog( - int? logId, - int? planId, - ) => + _i9.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#deleteLog, [logId, planId]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLogs, [plan]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/nutrition/nutritional_plan_screen_test.mocks.dart b/test/nutrition/nutritional_plan_screen_test.mocks.dart index b9e4f8e5..a2f4f529 100644 --- a/test/nutrition/nutritional_plan_screen_test.mocks.dart +++ b/test/nutrition/nutritional_plan_screen_test.mocks.dart @@ -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]. @@ -89,156 +60,97 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i3.Response>); } /// A class which mocks [AuthProvider]. @@ -250,154 +162,102 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { } @override - Map get metadata => (super.noSuchMethod( - Invocation.getter(#metadata), - returnValue: {}, - ) as Map); + Map get metadata => + (super.noSuchMethod(Invocation.getter(#metadata), returnValue: {}) + as Map); @override - _i2.AuthState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i2.AuthState.updateRequired, - ) as _i2.AuthState); + _i2.AuthState get state => + (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), - ), - ) as _i3.Client); + _i3.Client get client => + (super.noSuchMethod( + 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); + bool get dataInit => + (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, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#applicationVersion, value), + returnValueForMissingStub: null, + ); @override - set metadata(Map? value) => super.noSuchMethod( - Invocation.setter( - #metadata, - value, - ), - returnValueForMissingStub: null, - ); + set metadata(Map? 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); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i5.Future setServerVersion() => (super.noSuchMethod( - Invocation.method( - #setServerVersion, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future setServerVersion() => + (super.noSuchMethod( + Invocation.method(#setServerVersion, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future setApplicationVersion() => (super.noSuchMethod( - Invocation.method( - #setApplicationVersion, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future setApplicationVersion() => + (super.noSuchMethod( + Invocation.method(#setApplicationVersion, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future initVersions(String? serverUrl) => (super.noSuchMethod( - Invocation.method( - #initVersions, - [serverUrl], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future initVersions(String? serverUrl) => + (super.noSuchMethod( + Invocation.method(#initVersions, [serverUrl]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future applicationUpdateRequired([String? version]) => (super.noSuchMethod( - Invocation.method( - #applicationUpdateRequired, - [version], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future applicationUpdateRequired([String? version]) => + (super.noSuchMethod( + Invocation.method(#applicationUpdateRequired, [version]), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override _i5.Future<_i2.LoginActions> register({ @@ -408,19 +268,16 @@ 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, - }, - ), - returnValue: _i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update), - ) as _i5.Future<_i2.LoginActions>); + 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>); @override _i5.Future<_i2.LoginActions> login( @@ -430,104 +287,66 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { String? apiToken, ) => (super.noSuchMethod( - Invocation.method( - #login, - [ - username, - password, - serverUrl, - apiToken, - ], - ), - returnValue: _i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update), - ) as _i5.Future<_i2.LoginActions>); + Invocation.method(#login, [username, password, serverUrl, apiToken]), + returnValue: _i5.Future<_i2.LoginActions>.value(_i2.LoginActions.update), + ) + as _i5.Future<_i2.LoginActions>); @override - _i5.Future getServerUrlFromPrefs() => (super.noSuchMethod( - Invocation.method( - #getServerUrlFromPrefs, - [], - ), - returnValue: _i5.Future.value(_i7.dummyValue( - this, - Invocation.method( - #getServerUrlFromPrefs, - [], - ), - )), - ) as _i5.Future); + _i5.Future getServerUrlFromPrefs() => + (super.noSuchMethod( + Invocation.method(#getServerUrlFromPrefs, []), + returnValue: _i5.Future.value( + _i7.dummyValue(this, Invocation.method(#getServerUrlFromPrefs, [])), + ), + ) + as _i5.Future); @override - _i5.Future tryAutoLogin() => (super.noSuchMethod( - Invocation.method( - #tryAutoLogin, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future tryAutoLogin() => + (super.noSuchMethod( + Invocation.method(#tryAutoLogin, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future logout({bool? shouldNotify = true}) => (super.noSuchMethod( - Invocation.method( - #logout, - [], - {#shouldNotify: shouldNotify}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future logout({bool? shouldNotify = true}) => + (super.noSuchMethod( + Invocation.method(#logout, [], {#shouldNotify: shouldNotify}), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - String getAppNameHeader() => (super.noSuchMethod( - Invocation.method( - #getAppNameHeader, - [], - ), - returnValue: _i7.dummyValue( - this, - Invocation.method( - #getAppNameHeader, - [], - ), - ), - ) as String); + String getAppNameHeader() => + (super.noSuchMethod( + Invocation.method(#getAppNameHeader, []), + returnValue: _i7.dummyValue(this, Invocation.method(#getAppNameHeader, [])), + ) + as String); @override void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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]. @@ -539,46 +358,24 @@ class MockClient extends _i1.Mock implements _i3.Client { } @override - _i5.Future<_i3.Response> head( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i3.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#head, [url], {#headers: headers})), + ), + ) + as _i5.Future<_i3.Response>); @override - _i5.Future<_i3.Response> get( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i3.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#get, [url], {#headers: headers})), + ), + ) + as _i5.Future<_i3.Response>); @override _i5.Future<_i3.Response> post( @@ -588,28 +385,19 @@ class MockClient extends _i1.Mock implements _i3.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i5.Future<_i3.Response>); + 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}, + ), + ), + ), + ) + as _i5.Future<_i3.Response>); @override _i5.Future<_i3.Response> put( @@ -619,28 +407,19 @@ class MockClient extends _i1.Mock implements _i3.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i5.Future<_i3.Response>); + 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}, + ), + ), + ), + ) + as _i5.Future<_i3.Response>); @override _i5.Future<_i3.Response> patch( @@ -650,28 +429,19 @@ class MockClient extends _i1.Mock implements _i3.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i5.Future<_i3.Response>); + 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}, + ), + ), + ), + ) + as _i5.Future<_i3.Response>); @override _i5.Future<_i3.Response> delete( @@ -681,85 +451,53 @@ class MockClient extends _i1.Mock implements _i3.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i5.Future<_i3.Response>); @override - _i5.Future read( - Uri? url, { - Map? headers, - }) => + _i5.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future.value(_i7.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future); + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i5.Future.value( + _i7.dummyValue(this, Invocation.method(#read, [url], {#headers: headers})), + ), + ) + as _i5.Future); @override - _i5.Future<_i10.Uint8List> readBytes( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i10.Uint8List> readBytes(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), - ) as _i5.Future<_i10.Uint8List>); + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), + ) + as _i5.Future<_i10.Uint8List>); @override - _i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i5.Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_4( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i5.Future<_i3.StreamedResponse>); + _i5.Future<_i3.StreamedResponse> send(_i3.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method(#send, [request]), + returnValue: _i5.Future<_i3.StreamedResponse>.value( + _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); } diff --git a/test/nutrition/nutritional_plans_screen_test.mocks.dart b/test/nutrition/nutritional_plans_screen_test.mocks.dart index c1429fd5..5c63832f 100644 --- a/test/nutrition/nutritional_plans_screen_test.mocks.dart +++ b/test/nutrition/nutritional_plans_screen_test.mocks.dart @@ -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]. @@ -89,154 +60,102 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { } @override - Map get metadata => (super.noSuchMethod( - Invocation.getter(#metadata), - returnValue: {}, - ) as Map); + Map get metadata => + (super.noSuchMethod(Invocation.getter(#metadata), returnValue: {}) + as Map); @override - _i3.AuthState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i3.AuthState.updateRequired, - ) as _i3.AuthState); + _i3.AuthState get state => + (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), - ), - ) as _i2.Client); + _i2.Client get client => + (super.noSuchMethod( + 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); + bool get dataInit => + (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, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#applicationVersion, value), + returnValueForMissingStub: null, + ); @override - set metadata(Map? value) => super.noSuchMethod( - Invocation.setter( - #metadata, - value, - ), - returnValueForMissingStub: null, - ); + set metadata(Map? 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); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i5.Future setServerVersion() => (super.noSuchMethod( - Invocation.method( - #setServerVersion, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future setServerVersion() => + (super.noSuchMethod( + Invocation.method(#setServerVersion, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future setApplicationVersion() => (super.noSuchMethod( - Invocation.method( - #setApplicationVersion, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future setApplicationVersion() => + (super.noSuchMethod( + Invocation.method(#setApplicationVersion, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future initVersions(String? serverUrl) => (super.noSuchMethod( - Invocation.method( - #initVersions, - [serverUrl], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future initVersions(String? serverUrl) => + (super.noSuchMethod( + Invocation.method(#initVersions, [serverUrl]), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future applicationUpdateRequired([String? version]) => (super.noSuchMethod( - Invocation.method( - #applicationUpdateRequired, - [version], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future applicationUpdateRequired([String? version]) => + (super.noSuchMethod( + Invocation.method(#applicationUpdateRequired, [version]), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override _i5.Future<_i3.LoginActions> register({ @@ -247,19 +166,16 @@ 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, - }, - ), - returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update), - ) as _i5.Future<_i3.LoginActions>); + 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>); @override _i5.Future<_i3.LoginActions> login( @@ -269,104 +185,66 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { String? apiToken, ) => (super.noSuchMethod( - Invocation.method( - #login, - [ - username, - password, - serverUrl, - apiToken, - ], - ), - returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update), - ) as _i5.Future<_i3.LoginActions>); + Invocation.method(#login, [username, password, serverUrl, apiToken]), + returnValue: _i5.Future<_i3.LoginActions>.value(_i3.LoginActions.update), + ) + as _i5.Future<_i3.LoginActions>); @override - _i5.Future getServerUrlFromPrefs() => (super.noSuchMethod( - Invocation.method( - #getServerUrlFromPrefs, - [], - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #getServerUrlFromPrefs, - [], - ), - )), - ) as _i5.Future); + _i5.Future getServerUrlFromPrefs() => + (super.noSuchMethod( + Invocation.method(#getServerUrlFromPrefs, []), + returnValue: _i5.Future.value( + _i6.dummyValue(this, Invocation.method(#getServerUrlFromPrefs, [])), + ), + ) + as _i5.Future); @override - _i5.Future tryAutoLogin() => (super.noSuchMethod( - Invocation.method( - #tryAutoLogin, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future tryAutoLogin() => + (super.noSuchMethod( + Invocation.method(#tryAutoLogin, []), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future logout({bool? shouldNotify = true}) => (super.noSuchMethod( - Invocation.method( - #logout, - [], - {#shouldNotify: shouldNotify}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future logout({bool? shouldNotify = true}) => + (super.noSuchMethod( + Invocation.method(#logout, [], {#shouldNotify: shouldNotify}), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - String getAppNameHeader() => (super.noSuchMethod( - Invocation.method( - #getAppNameHeader, - [], - ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #getAppNameHeader, - [], - ), - ), - ) as String); + String getAppNameHeader() => + (super.noSuchMethod( + Invocation.method(#getAppNameHeader, []), + returnValue: _i6.dummyValue(this, Invocation.method(#getAppNameHeader, [])), + ) + as String); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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]. @@ -378,156 +256,97 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider { } @override - _i3.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_1( - this, - Invocation.getter(#auth), - ), - ) as _i3.AuthProvider); - - @override - _i2.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i2.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i3.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_1(this, Invocation.getter(#auth)), + ) + as _i3.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i2.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_0(this, Invocation.getter(#client)), + ) + as _i2.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i3.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i2.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i2.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i2.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i2.Response>); } /// A class which mocks [Client]. @@ -539,46 +358,24 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i5.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3(this, Invocation.method(#head, [url], {#headers: headers})), + ), + ) + as _i5.Future<_i2.Response>); @override - _i5.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3(this, Invocation.method(#get, [url], {#headers: headers})), + ), + ) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> post( @@ -588,28 +385,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i5.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> put( @@ -619,28 +407,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i5.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> patch( @@ -650,28 +429,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i5.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i5.Future<_i2.Response>); @override _i5.Future<_i2.Response> delete( @@ -681,85 +451,53 @@ class MockClient extends _i1.Mock implements _i2.Client { _i9.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i5.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i5.Future<_i2.Response>.value( + _FakeResponse_3( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i5.Future<_i2.Response>); @override - _i5.Future read( - Uri? url, { - Map? headers, - }) => + _i5.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future.value(_i6.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i5.Future); + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i5.Future.value( + _i6.dummyValue(this, Invocation.method(#read, [url], {#headers: headers})), + ), + ) + as _i5.Future); @override - _i5.Future<_i10.Uint8List> readBytes( - Uri? url, { - Map? headers, - }) => + _i5.Future<_i10.Uint8List> readBytes(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), - ) as _i5.Future<_i10.Uint8List>); + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), + ) + as _i5.Future<_i10.Uint8List>); @override - _i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i5.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_4( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i5.Future<_i2.StreamedResponse>); + _i5.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method(#send, [request]), + returnValue: _i5.Future<_i2.StreamedResponse>.value( + _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); } diff --git a/test/other/base_provider_test.mocks.dart b/test/other/base_provider_test.mocks.dart index f35c57fb..fd0d9ae9 100644 --- a/test/other/base_provider_test.mocks.dart +++ b/test/other/base_provider_test.mocks.dart @@ -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,46 +44,24 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i3.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0(this, Invocation.method(#head, [url], {#headers: headers})), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0(this, Invocation.method(#get, [url], {#headers: headers})), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> post( @@ -104,28 +71,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> put( @@ -135,28 +93,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> patch( @@ -166,28 +115,19 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - 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, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + 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}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> delete( @@ -197,85 +137,53 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future read( - Uri? url, { - Map? headers, - }) => + _i3.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future.value(_i5.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future); + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i3.Future.value( + _i5.dummyValue(this, Invocation.method(#read, [url], {#headers: headers})), + ), + ) + as _i3.Future); @override - _i3.Future<_i6.Uint8List> readBytes( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i6.Uint8List> readBytes(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), - ) as _i3.Future<_i6.Uint8List>); + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), + ) + as _i3.Future<_i6.Uint8List>); @override - _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i3.Future<_i2.StreamedResponse>); + _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method(#send, [request]), + returnValue: _i3.Future<_i2.StreamedResponse>.value( + _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); } diff --git a/test/providers/plate_calculator_test.mocks.dart b/test/providers/plate_calculator_test.mocks.dart index b9aecbe0..57fd2a99 100644 --- a/test/providers/plate_calculator_test.mocks.dart +++ b/test/providers/plate_calculator_test.mocks.dart @@ -33,182 +33,126 @@ class MockSharedPreferencesAsync extends _i1.Mock implements _i2.SharedPreferenc } @override - _i3.Future> getKeys({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #getKeys, - [], - {#allowList: allowList}, - ), - returnValue: _i3.Future>.value({}), - ) as _i3.Future>); - - @override - _i3.Future> getAll({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #getAll, - [], - {#allowList: allowList}, - ), - returnValue: _i3.Future>.value({}), - ) as _i3.Future>); - - @override - _i3.Future getBool(String? key) => (super.noSuchMethod( - Invocation.method( - #getBool, - [key], - ), - returnValue: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future getInt(String? key) => (super.noSuchMethod( - Invocation.method( - #getInt, - [key], - ), - returnValue: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future getDouble(String? key) => (super.noSuchMethod( - Invocation.method( - #getDouble, - [key], - ), - returnValue: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future getString(String? key) => (super.noSuchMethod( - Invocation.method( - #getString, - [key], - ), - returnValue: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future?> getStringList(String? key) => (super.noSuchMethod( - Invocation.method( - #getStringList, - [key], - ), - returnValue: _i3.Future?>.value(), - ) as _i3.Future?>); - - @override - _i3.Future containsKey(String? key) => (super.noSuchMethod( - Invocation.method( - #containsKey, - [key], - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - _i3.Future setBool( - String? key, - bool? value, - ) => + _i3.Future> getKeys({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #setBool, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#getKeys, [], {#allowList: allowList}), + returnValue: _i3.Future>.value({}), + ) + as _i3.Future>); @override - _i3.Future setInt( - String? key, - int? value, - ) => + _i3.Future> getAll({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #setInt, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#getAll, [], {#allowList: allowList}), + returnValue: _i3.Future>.value({}), + ) + as _i3.Future>); @override - _i3.Future setDouble( - String? key, - double? value, - ) => + _i3.Future getBool(String? key) => (super.noSuchMethod( - Invocation.method( - #setDouble, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#getBool, [key]), + returnValue: _i3.Future.value(), + ) + as _i3.Future); @override - _i3.Future setString( - String? key, - String? value, - ) => + _i3.Future getInt(String? key) => + (super.noSuchMethod(Invocation.method(#getInt, [key]), returnValue: _i3.Future.value()) + as _i3.Future); + + @override + _i3.Future getDouble(String? key) => (super.noSuchMethod( - Invocation.method( - #setString, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#getDouble, [key]), + returnValue: _i3.Future.value(), + ) + as _i3.Future); @override - _i3.Future setStringList( - String? key, - List? value, - ) => + _i3.Future getString(String? key) => (super.noSuchMethod( - Invocation.method( - #setStringList, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + Invocation.method(#getString, [key]), + returnValue: _i3.Future.value(), + ) + as _i3.Future); @override - _i3.Future remove(String? key) => (super.noSuchMethod( - Invocation.method( - #remove, - [key], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + _i3.Future?> getStringList(String? key) => + (super.noSuchMethod( + Invocation.method(#getStringList, [key]), + returnValue: _i3.Future?>.value(), + ) + as _i3.Future?>); @override - _i3.Future clear({Set? allowList}) => (super.noSuchMethod( - Invocation.method( - #clear, - [], - {#allowList: allowList}, - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); + _i3.Future containsKey(String? key) => + (super.noSuchMethod( + Invocation.method(#containsKey, [key]), + returnValue: _i3.Future.value(false), + ) + as _i3.Future); + + @override + _i3.Future setBool(String? key, bool? value) => + (super.noSuchMethod( + Invocation.method(#setBool, [key, value]), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); + + @override + _i3.Future setInt(String? key, int? value) => + (super.noSuchMethod( + Invocation.method(#setInt, [key, value]), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); + + @override + _i3.Future setDouble(String? key, double? value) => + (super.noSuchMethod( + Invocation.method(#setDouble, [key, value]), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); + + @override + _i3.Future setString(String? key, String? value) => + (super.noSuchMethod( + Invocation.method(#setString, [key, value]), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); + + @override + _i3.Future setStringList(String? key, List? value) => + (super.noSuchMethod( + Invocation.method(#setStringList, [key, value]), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); + + @override + _i3.Future remove(String? key) => + (super.noSuchMethod( + Invocation.method(#remove, [key]), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); + + @override + _i3.Future clear({Set? allowList}) => + (super.noSuchMethod( + Invocation.method(#clear, [], {#allowList: allowList}), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) + as _i3.Future); } diff --git a/test/routine/day_form_test.dart b/test/routine/day_form_test.dart index d0f39926..bd1ef762 100644 --- a/test/routine/day_form_test.dart +++ b/test/routine/day_form_test.dart @@ -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])), ), ), ); diff --git a/test/routine/day_form_test.mocks.dart b/test/routine/day_form_test.mocks.dart index 4df7295b..211c521f 100644 --- a/test/routine/day_form_test.mocks.dart +++ b/test/routine/day_form_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/forms/session_form_test.mocks.dart b/test/routine/forms/session_form_test.mocks.dart index f6c5b483..c167ffaa 100644 --- a/test/routine/forms/session_form_test.mocks.dart +++ b/test/routine/forms/session_form_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/gym_mode_screen_test.mocks.dart b/test/routine/gym_mode_screen_test.mocks.dart index 0e3e3ea4..468c5600 100644 --- a/test/routine/gym_mode_screen_test.mocks.dart +++ b/test/routine/gym_mode_screen_test.mocks.dart @@ -46,203 +46,88 @@ import 'package:wger/providers/routines.dart' as _i23; // 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 _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider { - _FakeWgerBaseProvider_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWgerBaseProvider_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase { - _FakeExerciseDatabase_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseDatabase_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise { - _FakeExercise_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory { - _FakeExerciseCategory_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseCategory_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEquipment_8 extends _i1.SmartFake implements _i8.Equipment { - _FakeEquipment_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEquipment_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMuscle_9 extends _i1.SmartFake implements _i9.Muscle { - _FakeMuscle_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMuscle_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeLanguage_10 extends _i1.SmartFake implements _i10.Language { - _FakeLanguage_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLanguage_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWeightUnit_11 extends _i1.SmartFake implements _i11.WeightUnit { - _FakeWeightUnit_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_11(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_12 extends _i1.SmartFake implements _i12.RepetitionUnit { - _FakeRepetitionUnit_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_12(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_13 extends _i1.SmartFake implements _i13.Routine { - _FakeRoutine_13( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_13(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_14 extends _i1.SmartFake implements _i14.Day { - _FakeDay_14( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_14(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_15 extends _i1.SmartFake implements _i15.Slot { - _FakeSlot_15( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_15(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_16 extends _i1.SmartFake implements _i16.SlotEntry { - _FakeSlotEntry_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_16(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_17 extends _i1.SmartFake implements _i17.BaseConfig { - _FakeBaseConfig_17( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_17(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_18 extends _i1.SmartFake implements _i18.WorkoutSession { - _FakeWorkoutSession_18( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_18(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_19 extends _i1.SmartFake implements _i19.Log { - _FakeLog_19( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_19(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -254,156 +139,97 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i20.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i20.Future>.value([]), - ) as _i20.Future>); - - @override - _i20.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i20.Future>.value({}), - ) as _i20.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i20.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i20.Future>.value({}), - ) as _i20.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i20.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i20.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i20.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i20.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i20.Future>.value([]), + ) + as _i20.Future>); + + @override + _i20.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i20.Future>.value({}), + ) + as _i20.Future>); + + @override + _i20.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i20.Future>.value({}), + ) + as _i20.Future>); + + @override + _i20.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i20.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i20.Future<_i3.Response>); } /// A class which mocks [ExercisesProvider]. @@ -415,292 +241,211 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider { } @override - _i4.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_4( - this, - Invocation.getter(#baseProvider), - ), - ) as _i4.WgerBaseProvider); + _i4.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_4(this, Invocation.getter(#baseProvider)), + ) + as _i4.WgerBaseProvider); @override - _i5.ExerciseDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeExerciseDatabase_5( - this, - Invocation.getter(#database), - ), - ) as _i5.ExerciseDatabase); + _i5.ExerciseDatabase get database => + (super.noSuchMethod( + 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>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get exercises => + (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>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get filteredExercises => + (super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[]) + as List<_i6.Exercise>); @override - Map> get exerciseByVariation => (super.noSuchMethod( - Invocation.getter(#exerciseByVariation), - returnValue: >{}, - ) as Map>); + Map> get exerciseByVariation => + (super.noSuchMethod( + Invocation.getter(#exerciseByVariation), + returnValue: >{}, + ) + as Map>); @override - List<_i7.ExerciseCategory> get categories => (super.noSuchMethod( - Invocation.getter(#categories), - returnValue: <_i7.ExerciseCategory>[], - ) as List<_i7.ExerciseCategory>); + List<_i7.ExerciseCategory> get categories => + (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>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get muscles => + (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>[], - ) as List<_i8.Equipment>); + List<_i8.Equipment> get 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>[], - ) as List<_i10.Language>); + List<_i10.Language> get languages => + (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( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#filteredExercises, newFilteredExercises), + returnValueForMissingStub: null, + ); @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 => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i20.Future setFilters(_i21.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i20.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - 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], - ), - ), - ) as _i6.Exercise); - - @override - List<_i6.Exercise> findExercisesByVariationId( - int? variationId, { - int? exerciseIdToExclude, - }) => + _i20.Future setFilters(_i21.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #findExercisesByVariationId, - [variationId], - {#exerciseIdToExclude: exerciseIdToExclude}, - ), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + Invocation.method(#setFilters, [newFilters]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i7.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeExerciseCategory_7( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i7.ExerciseCategory); + void initFilters() => + super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null); @override - _i8.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), - returnValue: _FakeEquipment_8( - this, - Invocation.method( - #findEquipmentById, - [id], - ), - ), - ) as _i8.Equipment); + _i20.Future findByFilters() => + (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i9.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), - returnValue: _FakeMuscle_9( - this, - Invocation.method( - #findMuscleById, - [id], - ), - ), - ) as _i9.Muscle); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i10.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), - returnValue: _FakeLanguage_10( - this, - Invocation.method( - #findLanguageById, - [id], - ), - ), - ) as _i10.Language); + _i6.Exercise findExerciseById(int? id) => + (super.noSuchMethod( + Invocation.method(#findExerciseById, [id]), + returnValue: _FakeExercise_6(this, Invocation.method(#findExerciseById, [id])), + ) + as _i6.Exercise); @override - _i20.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + List<_i6.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) => + (super.noSuchMethod( + Invocation.method( + #findExercisesByVariationId, + [variationId], + {#exerciseIdToExclude: exerciseIdToExclude}, + ), + returnValue: <_i6.Exercise>[], + ) + as List<_i6.Exercise>); @override - _i20.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i7.ExerciseCategory findCategoryById(int? id) => + (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeExerciseCategory_7(this, Invocation.method(#findCategoryById, [id])), + ) + as _i7.ExerciseCategory); @override - _i20.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i8.Equipment findEquipmentById(int? id) => + (super.noSuchMethod( + Invocation.method(#findEquipmentById, [id]), + returnValue: _FakeEquipment_8(this, Invocation.method(#findEquipmentById, [id])), + ) + as _i8.Equipment); @override - _i20.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i9.Muscle findMuscleById(int? id) => + (super.noSuchMethod( + Invocation.method(#findMuscleById, [id]), + returnValue: _FakeMuscle_9(this, Invocation.method(#findMuscleById, [id])), + ) + as _i9.Muscle); @override - _i20.Future fetchAndSetAllExercises() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllExercises, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i10.Language findLanguageById(int? id) => + (super.noSuchMethod( + Invocation.method(#findLanguageById, [id]), + returnValue: _FakeLanguage_10(this, Invocation.method(#findLanguageById, [id])), + ) + as _i10.Language); @override - _i20.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i20.Future<_i6.Exercise?>.value(), - ) as _i20.Future<_i6.Exercise?>); + _i20.Future fetchAndSetCategoriesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future fetchAndSetMusclesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future fetchAndSetEquipmentsFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future fetchAndSetLanguagesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future fetchAndSetAllExercises() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllExercises, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i20.Future<_i6.Exercise?>.value(), + ) + as _i20.Future<_i6.Exercise?>); @override _i20.Future<_i6.Exercise> handleUpdateExerciseFromApi( @@ -708,55 +453,42 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i20.Future<_i6.Exercise>.value(_FakeExercise_6( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - )), - ) as _i20.Future<_i6.Exercise>); + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + returnValue: _i20.Future<_i6.Exercise>.value( + _FakeExercise_6( + this, + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + ), + ), + ) + as _i20.Future<_i6.Exercise>); @override - _i20.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => + (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future clearAllCachesAndPrefs() => + (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetInitialData() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override _i20.Future setExercisesFromDatabase( @@ -764,64 +496,60 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider { bool? forceDeleteCache = false, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesFromDatabase, - [database], - {#forceDeleteCache: forceDeleteCache}, - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method( + #setExercisesFromDatabase, + [database], + {#forceDeleteCache: forceDeleteCache}, + ), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future updateExerciseCache(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override _i20.Future> searchExercise( @@ -830,52 +558,34 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider { bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchExercise, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i20.Future>.value(<_i6.Exercise>[]), - ) as _i20.Future>); + Invocation.method( + #searchExercise, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i20.Future>.value(<_i6.Exercise>[]), + ) + as _i20.Future>); @override void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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 [RoutinesProvider]. @@ -887,174 +597,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider { } @override - _i4.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_4( - this, - Invocation.getter(#baseProvider), - ), - ) as _i4.WgerBaseProvider); + _i4.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i13.Routine>); + List<_i13.Routine> get items => + (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>[], - ) as List<_i11.WeightUnit>); + List<_i11.WeightUnit> get weightUnits => + (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), - ), - ) as _i11.WeightUnit); + _i11.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i12.RepetitionUnit>); + List<_i12.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i12.RepetitionUnit); + _i12.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i12.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i11.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_11( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i11.WeightUnit); + _i11.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_11(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i11.WeightUnit); @override - _i12.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_12( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i12.RepetitionUnit); + _i12.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_12( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i12.RepetitionUnit); @override - List<_i13.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i13.Routine>[], - ) as List<_i13.Routine>); + List<_i13.Routine> getPlans() => + (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], - ), - ), - ) as _i13.Routine); + _i13.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i20.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + _i20.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override _i20.Future setExercisesAndUnits( @@ -1062,505 +719,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future<_i13.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i20.Future<_i13.Routine>); - - @override - _i20.Future<_i13.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i20.Future<_i13.Routine>); - - @override - _i20.Future<_i13.Routine> addRoutine(_i13.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i20.Future<_i13.Routine>.value(_FakeRoutine_13( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i20.Future<_i13.Routine>); - - @override - _i20.Future editRoutine(_i13.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future<_i14.Day> addDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i20.Future<_i14.Day>.value(_FakeDay_14( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i20.Future<_i14.Day>); - - @override - _i20.Future editDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future editDays(List<_i14.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); - - @override - _i20.Future<_i15.Slot> addSlot( - _i15.Slot? slot, - int? routineId, - ) => + _i20.Future<_i13.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i20.Future<_i15.Slot>.value(_FakeSlot_15( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i20.Future<_i15.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i20.Future<_i13.Routine>.value( + _FakeRoutine_13(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i20.Future<_i13.Routine>); @override - _i20.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i20.Future<_i13.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i20.Future<_i13.Routine>.value( + _FakeRoutine_13(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i20.Future<_i13.Routine>); @override - _i20.Future editSlot( - _i15.Slot? slot, - int? routineId, - ) => + _i20.Future<_i13.Routine> addRoutine(_i13.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i20.Future<_i13.Routine>.value( + _FakeRoutine_13(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i20.Future<_i13.Routine>); @override - _i20.Future editSlots( - List<_i15.Slot>? slots, - int? routineId, - ) => + _i20.Future editRoutine(_i13.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future<_i16.SlotEntry> addSlotEntry( - _i16.SlotEntry? entry, - int? routineId, - ) => + _i20.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i20.Future<_i16.SlotEntry>.value(_FakeSlotEntry_16( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i20.Future<_i16.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i20.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future editSlotEntry( - _i16.SlotEntry? entry, - int? routineId, - ) => + _i20.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - String getConfigUrl(_i16.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i25.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i20.Future<_i17.BaseConfig> editConfig( - _i17.BaseConfig? config, - _i16.ConfigType? type, - ) => + _i20.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i20.Future<_i17.BaseConfig>.value(_FakeBaseConfig_17( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i20.Future<_i17.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future<_i17.BaseConfig> addConfig( - _i17.BaseConfig? config, - _i16.ConfigType? type, - ) => + _i20.Future<_i14.Day> addDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i20.Future<_i17.BaseConfig>.value(_FakeBaseConfig_17( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i20.Future<_i17.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i20.Future<_i14.Day>.value( + _FakeDay_14(this, Invocation.method(#addDay, [day])), + ), + ) + as _i20.Future<_i14.Day>); @override - _i20.Future deleteConfig( - int? id, - _i16.ConfigType? type, - ) => + _i20.Future editDay(_i14.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#editDay, [day]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future handleConfig( - _i16.SlotEntry? entry, - num? value, - _i16.ConfigType? type, - ) => + _i20.Future editDays(List<_i14.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#editDays, [days]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i20.Future>.value(<_i18.WorkoutSession>[]), - ) as _i20.Future>); - - @override - _i20.Future<_i18.WorkoutSession> addSession( - _i18.WorkoutSession? session, - int? routineId, - ) => + _i20.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i20.Future<_i18.WorkoutSession>.value(_FakeWorkoutSession_18( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i20.Future<_i18.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override - _i20.Future<_i18.WorkoutSession> editSession(_i18.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i20.Future<_i18.WorkoutSession>.value(_FakeWorkoutSession_18( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i20.Future<_i18.WorkoutSession>); - - @override - _i20.Future<_i19.Log> addLog(_i19.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i20.Future<_i19.Log>.value(_FakeLog_19( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i20.Future<_i19.Log>); - - @override - _i20.Future deleteLog( - int? logId, - int? routineId, - ) => + _i20.Future<_i15.Slot> addSlot(_i15.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i20.Future<_i15.Slot>.value( + _FakeSlot_15(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i20.Future<_i15.Slot>); + + @override + _i20.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future editSlot(_i15.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future editSlots(List<_i15.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _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])), + ), + ) + as _i20.Future<_i16.SlotEntry>); + + @override + _i20.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future editSlotEntry(_i16.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + String getConfigUrl(_i16.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i25.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i20.Future<_i17.BaseConfig>); + + @override + _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])), + ), + ) + as _i20.Future<_i17.BaseConfig>); + + @override + _i20.Future deleteConfig(int? id, _i16.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future handleConfig(_i16.SlotEntry? entry, num? value, _i16.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); + + @override + _i20.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i20.Future>.value(<_i18.WorkoutSession>[]), + ) + as _i20.Future>); + + @override + _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])), + ), + ) + as _i20.Future<_i18.WorkoutSession>); + + @override + _i20.Future<_i18.WorkoutSession> editSession(_i18.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i20.Future<_i18.WorkoutSession>.value( + _FakeWorkoutSession_18(this, Invocation.method(#editSession, [session])), + ), + ) + as _i20.Future<_i18.WorkoutSession>); + + @override + _i20.Future<_i19.Log> addLog(_i19.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i20.Future<_i19.Log>.value( + _FakeLog_19(this, Invocation.method(#addLog, [log])), + ), + ) + as _i20.Future<_i19.Log>); + + @override + _i20.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) + as _i20.Future); @override void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/gym_mode_session_screen_test.mocks.dart b/test/routine/gym_mode_session_screen_test.mocks.dart index 78725bf3..05bb0ba5 100644 --- a/test/routine/gym_mode_session_screen_test.mocks.dart +++ b/test/routine/gym_mode_session_screen_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/repetition_unit_form_widget_test.mocks.dart b/test/routine/repetition_unit_form_widget_test.mocks.dart index 6c6fde11..7294923b 100644 --- a/test/routine/repetition_unit_form_widget_test.mocks.dart +++ b/test/routine/repetition_unit_form_widget_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/routine_edit_screen_test.mocks.dart b/test/routine/routine_edit_screen_test.mocks.dart index 5a48f35d..26ed8b10 100644 --- a/test/routine/routine_edit_screen_test.mocks.dart +++ b/test/routine/routine_edit_screen_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/routine_edit_test.mocks.dart b/test/routine/routine_edit_test.mocks.dart index b182db36..11e15eb9 100644 --- a/test/routine/routine_edit_test.mocks.dart +++ b/test/routine/routine_edit_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/routine_form_test.mocks.dart b/test/routine/routine_form_test.mocks.dart index bce93593..84648c71 100644 --- a/test/routine/routine_form_test.mocks.dart +++ b/test/routine/routine_form_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/routine_logs_screen_test.mocks.dart b/test/routine/routine_logs_screen_test.mocks.dart index 365fec88..24560f3c 100644 --- a/test/routine/routine_logs_screen_test.mocks.dart +++ b/test/routine/routine_logs_screen_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/routine_screen_test.mocks.dart b/test/routine/routine_screen_test.mocks.dart index eaa9d719..73f33eef 100644 --- a/test/routine/routine_screen_test.mocks.dart +++ b/test/routine/routine_screen_test.mocks.dart @@ -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]. @@ -74,154 +50,95 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i3.Response>); } diff --git a/test/routine/routines_provider_test.mocks.dart b/test/routine/routines_provider_test.mocks.dart index 0d3699ad..c949f79b 100644 --- a/test/routine/routines_provider_test.mocks.dart +++ b/test/routine/routines_provider_test.mocks.dart @@ -34,113 +34,50 @@ import 'package:wger/providers/exercises.dart' as _i12; // 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 _FakeWgerBaseProvider_4 extends _i1.SmartFake implements _i4.WgerBaseProvider { - _FakeWgerBaseProvider_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWgerBaseProvider_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExerciseDatabase_5 extends _i1.SmartFake implements _i5.ExerciseDatabase { - _FakeExerciseDatabase_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseDatabase_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeExercise_6 extends _i1.SmartFake implements _i6.Exercise { - _FakeExercise_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExercise_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeExerciseCategory_7 extends _i1.SmartFake implements _i7.ExerciseCategory { - _FakeExerciseCategory_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeExerciseCategory_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEquipment_8 extends _i1.SmartFake implements _i8.Equipment { - _FakeEquipment_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEquipment_8(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeMuscle_9 extends _i1.SmartFake implements _i9.Muscle { - _FakeMuscle_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeMuscle_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeLanguage_10 extends _i1.SmartFake implements _i10.Language { - _FakeLanguage_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLanguage_10(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [WgerBaseProvider]. @@ -152,156 +89,97 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i11.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i11.Future>.value([]), - ) as _i11.Future>); - - @override - _i11.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i11.Future>.value({}), - ) as _i11.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i11.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i11.Future>.value({}), - ) as _i11.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i11.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i11.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i11.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i11.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i11.Future>.value([]), + ) + as _i11.Future>); + + @override + _i11.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i11.Future>.value({}), + ) + as _i11.Future>); + + @override + _i11.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i11.Future>.value({}), + ) + as _i11.Future>); + + @override + _i11.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i11.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i11.Future<_i3.Response>); } /// A class which mocks [ExercisesProvider]. @@ -313,292 +191,211 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { } @override - _i4.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_4( - this, - Invocation.getter(#baseProvider), - ), - ) as _i4.WgerBaseProvider); + _i4.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_4(this, Invocation.getter(#baseProvider)), + ) + as _i4.WgerBaseProvider); @override - _i5.ExerciseDatabase get database => (super.noSuchMethod( - Invocation.getter(#database), - returnValue: _FakeExerciseDatabase_5( - this, - Invocation.getter(#database), - ), - ) as _i5.ExerciseDatabase); + _i5.ExerciseDatabase get database => + (super.noSuchMethod( + 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>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get exercises => + (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>[], - ) as List<_i6.Exercise>); + List<_i6.Exercise> get filteredExercises => + (super.noSuchMethod(Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[]) + as List<_i6.Exercise>); @override - Map> get exerciseByVariation => (super.noSuchMethod( - Invocation.getter(#exerciseByVariation), - returnValue: >{}, - ) as Map>); + Map> get exerciseByVariation => + (super.noSuchMethod( + Invocation.getter(#exerciseByVariation), + returnValue: >{}, + ) + as Map>); @override - List<_i7.ExerciseCategory> get categories => (super.noSuchMethod( - Invocation.getter(#categories), - returnValue: <_i7.ExerciseCategory>[], - ) as List<_i7.ExerciseCategory>); + List<_i7.ExerciseCategory> get categories => + (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>[], - ) as List<_i9.Muscle>); + List<_i9.Muscle> get muscles => + (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>[], - ) as List<_i8.Equipment>); + List<_i8.Equipment> get 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>[], - ) as List<_i10.Language>); + List<_i10.Language> get languages => + (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( - Invocation.setter( - #filteredExercises, - newFilteredExercises, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#filteredExercises, newFilteredExercises), + returnValueForMissingStub: null, + ); @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 => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i11.Future setFilters(_i12.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #setFilters, - [newFilters], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - void initFilters() => super.noSuchMethod( - Invocation.method( - #initFilters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i11.Future findByFilters() => (super.noSuchMethod( - Invocation.method( - #findByFilters, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - 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], - ), - ), - ) as _i6.Exercise); - - @override - List<_i6.Exercise> findExercisesByVariationId( - int? variationId, { - int? exerciseIdToExclude, - }) => + _i11.Future setFilters(_i12.Filters? newFilters) => (super.noSuchMethod( - Invocation.method( - #findExercisesByVariationId, - [variationId], - {#exerciseIdToExclude: exerciseIdToExclude}, - ), - returnValue: <_i6.Exercise>[], - ) as List<_i6.Exercise>); + Invocation.method(#setFilters, [newFilters]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i7.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method( - #findCategoryById, - [id], - ), - returnValue: _FakeExerciseCategory_7( - this, - Invocation.method( - #findCategoryById, - [id], - ), - ), - ) as _i7.ExerciseCategory); + void initFilters() => + super.noSuchMethod(Invocation.method(#initFilters, []), returnValueForMissingStub: null); @override - _i8.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method( - #findEquipmentById, - [id], - ), - returnValue: _FakeEquipment_8( - this, - Invocation.method( - #findEquipmentById, - [id], - ), - ), - ) as _i8.Equipment); + _i11.Future findByFilters() => + (super.noSuchMethod( + Invocation.method(#findByFilters, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i9.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method( - #findMuscleById, - [id], - ), - returnValue: _FakeMuscle_9( - this, - Invocation.method( - #findMuscleById, - [id], - ), - ), - ) as _i9.Muscle); + void clear() => + super.noSuchMethod(Invocation.method(#clear, []), returnValueForMissingStub: null); @override - _i10.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method( - #findLanguageById, - [id], - ), - returnValue: _FakeLanguage_10( - this, - Invocation.method( - #findLanguageById, - [id], - ), - ), - ) as _i10.Language); + _i6.Exercise findExerciseById(int? id) => + (super.noSuchMethod( + Invocation.method(#findExerciseById, [id]), + returnValue: _FakeExercise_6(this, Invocation.method(#findExerciseById, [id])), + ) + as _i6.Exercise); @override - _i11.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategoriesFromApi, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + List<_i6.Exercise> findExercisesByVariationId(int? variationId, {int? exerciseIdToExclude}) => + (super.noSuchMethod( + Invocation.method( + #findExercisesByVariationId, + [variationId], + {#exerciseIdToExclude: exerciseIdToExclude}, + ), + returnValue: <_i6.Exercise>[], + ) + as List<_i6.Exercise>); @override - _i11.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMusclesFromApi, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i7.ExerciseCategory findCategoryById(int? id) => + (super.noSuchMethod( + Invocation.method(#findCategoryById, [id]), + returnValue: _FakeExerciseCategory_7(this, Invocation.method(#findCategoryById, [id])), + ) + as _i7.ExerciseCategory); @override - _i11.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipmentsFromApi, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i8.Equipment findEquipmentById(int? id) => + (super.noSuchMethod( + Invocation.method(#findEquipmentById, [id]), + returnValue: _FakeEquipment_8(this, Invocation.method(#findEquipmentById, [id])), + ) + as _i8.Equipment); @override - _i11.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguagesFromApi, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i9.Muscle findMuscleById(int? id) => + (super.noSuchMethod( + Invocation.method(#findMuscleById, [id]), + returnValue: _FakeMuscle_9(this, Invocation.method(#findMuscleById, [id])), + ) + as _i9.Muscle); @override - _i11.Future fetchAndSetAllExercises() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllExercises, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i10.Language findLanguageById(int? id) => + (super.noSuchMethod( + Invocation.method(#findLanguageById, [id]), + returnValue: _FakeLanguage_10(this, Invocation.method(#findLanguageById, [id])), + ) + as _i10.Language); @override - _i11.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetExercise, - [exerciseId], - ), - returnValue: _i11.Future<_i6.Exercise?>.value(), - ) as _i11.Future<_i6.Exercise?>); + _i11.Future fetchAndSetCategoriesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategoriesFromApi, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future fetchAndSetMusclesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMusclesFromApi, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future fetchAndSetEquipmentsFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipmentsFromApi, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future fetchAndSetLanguagesFromApi() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguagesFromApi, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future fetchAndSetAllExercises() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllExercises, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetExercise, [exerciseId]), + returnValue: _i11.Future<_i6.Exercise?>.value(), + ) + as _i11.Future<_i6.Exercise?>); @override _i11.Future<_i6.Exercise> handleUpdateExerciseFromApi( @@ -606,55 +403,42 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { int? exerciseId, ) => (super.noSuchMethod( - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - returnValue: _i11.Future<_i6.Exercise>.value(_FakeExercise_6( - this, - Invocation.method( - #handleUpdateExerciseFromApi, - [ - database, - exerciseId, - ], - ), - )), - ) as _i11.Future<_i6.Exercise>); + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + returnValue: _i11.Future<_i6.Exercise>.value( + _FakeExercise_6( + this, + Invocation.method(#handleUpdateExerciseFromApi, [database, exerciseId]), + ), + ), + ) + as _i11.Future<_i6.Exercise>); @override - _i11.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => (super.noSuchMethod( - Invocation.method( - #initCacheTimesLocalPrefs, - [], - {#forceInit: forceInit}, - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future initCacheTimesLocalPrefs({dynamic forceInit = false}) => + (super.noSuchMethod( + Invocation.method(#initCacheTimesLocalPrefs, [], {#forceInit: forceInit}), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future clearAllCachesAndPrefs() => (super.noSuchMethod( - Invocation.method( - #clearAllCachesAndPrefs, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future clearAllCachesAndPrefs() => + (super.noSuchMethod( + Invocation.method(#clearAllCachesAndPrefs, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetInitialData, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetInitialData() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetInitialData, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override _i11.Future setExercisesFromDatabase( @@ -662,64 +446,60 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { bool? forceDeleteCache = false, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesFromDatabase, - [database], - {#forceDeleteCache: forceDeleteCache}, - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + Invocation.method( + #setExercisesFromDatabase, + [database], + {#forceDeleteCache: forceDeleteCache}, + ), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #updateExerciseCache, - [database], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future updateExerciseCache(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#updateExerciseCache, [database]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetMuscles, - [database], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetMuscles(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetMuscles, [database]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetCategories, - [database], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetCategories(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetCategories, [database]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLanguages, - [database], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetLanguages(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLanguages, [database]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEquipments, - [database], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetEquipments(_i5.ExerciseDatabase? database) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEquipments, [database]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override _i11.Future> searchExercise( @@ -728,50 +508,32 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchExercise, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i11.Future>.value(<_i6.Exercise>[]), - ) as _i11.Future>); + Invocation.method( + #searchExercise, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i11.Future>.value(<_i6.Exercise>[]), + ) + as _i11.Future>); @override void addListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/routines_screen_test.mocks.dart b/test/routine/routines_screen_test.mocks.dart index 29154394..48952b88 100644 --- a/test/routine/routines_screen_test.mocks.dart +++ b/test/routine/routines_screen_test.mocks.dart @@ -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]. @@ -74,154 +50,95 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i3.Response>); } diff --git a/test/routine/slot_entry_form_test.mocks.dart b/test/routine/slot_entry_form_test.mocks.dart index d0a17c54..c9606827 100644 --- a/test/routine/slot_entry_form_test.mocks.dart +++ b/test/routine/slot_entry_form_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/routine/weight_unit_form_widget_test.mocks.dart b/test/routine/weight_unit_form_widget_test.mocks.dart index 6b8d818f..c862b9ac 100644 --- a/test/routine/weight_unit_form_widget_test.mocks.dart +++ b/test/routine/weight_unit_form_widget_test.mocks.dart @@ -38,103 +38,46 @@ import 'package:wger/providers/routines.dart' as _i12; // 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 _FakeWeightUnit_1 extends _i1.SmartFake implements _i3.WeightUnit { - _FakeWeightUnit_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWeightUnit_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeRepetitionUnit_2 extends _i1.SmartFake implements _i4.RepetitionUnit { - _FakeRepetitionUnit_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRepetitionUnit_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRoutine_3 extends _i1.SmartFake implements _i5.Routine { - _FakeRoutine_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRoutine_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeDay_4 extends _i1.SmartFake implements _i6.Day { - _FakeDay_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDay_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlot_5 extends _i1.SmartFake implements _i7.Slot { - _FakeSlot_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlot_5(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeSlotEntry_6 extends _i1.SmartFake implements _i8.SlotEntry { - _FakeSlotEntry_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSlotEntry_6(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeBaseConfig_7 extends _i1.SmartFake implements _i9.BaseConfig { - _FakeBaseConfig_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeBaseConfig_7(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession { - _FakeWorkoutSession_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeWorkoutSession_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLog_9 extends _i1.SmartFake implements _i11.Log { - _FakeLog_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); } /// A class which mocks [RoutinesProvider]. @@ -146,174 +89,121 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i5.Routine>); + List<_i5.Routine> get items => + (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>[], - ) as List<_i3.WeightUnit>); + List<_i3.WeightUnit> get weightUnits => + (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), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit get defaultWeightUnit => + (super.noSuchMethod( + 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>[], - ) as List<_i4.RepetitionUnit>); + List<_i4.RepetitionUnit> get repetitionUnits => + (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), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit get defaultRepetitionUnit => + (super.noSuchMethod( + 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( - Invocation.setter( - #weightUnits, - weightUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#weightUnits, weightUnits), + returnValueForMissingStub: null, + ); @override set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter( - #repetitionUnits, - repetitionUnits, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#repetitionUnits, repetitionUnits), + returnValueForMissingStub: null, + ); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + 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 - _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findWeightUnitById, - [id], - ), - returnValue: _FakeWeightUnit_1( - this, - Invocation.method( - #findWeightUnitById, - [id], - ), - ), - ) as _i3.WeightUnit); + _i3.WeightUnit findWeightUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findWeightUnitById, [id]), + returnValue: _FakeWeightUnit_1(this, Invocation.method(#findWeightUnitById, [id])), + ) + as _i3.WeightUnit); @override - _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method( - #findRepetitionUnitById, - [id], - ), - returnValue: _FakeRepetitionUnit_2( - this, - Invocation.method( - #findRepetitionUnitById, - [id], - ), - ), - ) as _i4.RepetitionUnit); + _i4.RepetitionUnit findRepetitionUnitById(int? id) => + (super.noSuchMethod( + Invocation.method(#findRepetitionUnitById, [id]), + returnValue: _FakeRepetitionUnit_2( + this, + Invocation.method(#findRepetitionUnitById, [id]), + ), + ) + as _i4.RepetitionUnit); @override - List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method( - #getPlans, - [], - ), - returnValue: <_i5.Routine>[], - ) as List<_i5.Routine>); + List<_i5.Routine> getPlans() => + (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], - ), - ), - ) as _i5.Routine); + _i5.Routine findById(int? id) => + (super.noSuchMethod( + 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); + int findIndexById(int? id) => + (super.noSuchMethod(Invocation.method(#findIndexById, [id]), returnValue: 0) as int); @override - _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesFull, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesFull, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllRoutinesSparse, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + _i13.Future fetchAndSetAllRoutinesSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllRoutinesSparse, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override _i13.Future setExercisesAndUnits( @@ -321,505 +211,299 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { Map? exercises, }) => (super.noSuchMethod( - Invocation.method( - #setExercisesAndUnits, - [entries], - {#exercises: exercises}, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#setExercisesAndUnits, [entries], {#exercises: exercises}), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineSparse, - [planId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #fetchAndSetRoutineFull, - [routineId], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #addRoutine, - [routine], - ), - returnValue: _i13.Future<_i5.Routine>.value(_FakeRoutine_3( - this, - Invocation.method( - #addRoutine, - [routine], - ), - )), - ) as _i13.Future<_i5.Routine>); - - @override - _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editRoutine, - [routine], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteRoutine, - [id], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetRepetitionUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetWeightUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetUnits, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addDay, - [day], - ), - returnValue: _i13.Future<_i6.Day>.value(_FakeDay_4( - this, - Invocation.method( - #addDay, - [day], - ), - )), - ) as _i13.Future<_i6.Day>); - - @override - _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #editDay, - [day], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #editDays, - [days], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #deleteDay, - [dayId], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i7.Slot> addSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future<_i7.Slot>.value(_FakeSlot_5( - this, - Invocation.method( - #addSlot, - [ - slot, - routineId, - ], - ), - )), - ) as _i13.Future<_i7.Slot>); + Invocation.method(#fetchAndSetRoutineSparse, [planId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineSparse, [planId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future deleteSlot( - int? slotId, - int? routineId, - ) => + _i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteSlot, - [ - slotId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRoutineFull, [routineId]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#fetchAndSetRoutineFull, [routineId])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlot( - _i7.Slot? slot, - int? routineId, - ) => + _i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlot, - [ - slot, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addRoutine, [routine]), + returnValue: _i13.Future<_i5.Routine>.value( + _FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])), + ), + ) + as _i13.Future<_i5.Routine>); @override - _i13.Future editSlots( - List<_i7.Slot>? slots, - int? routineId, - ) => + _i13.Future editRoutine(_i5.Routine? routine) => (super.noSuchMethod( - Invocation.method( - #editSlots, - [ - slots, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editRoutine, [routine]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i8.SlotEntry> addSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future deleteRoutine(int? id) => (super.noSuchMethod( - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSlotEntry, - [ - entry, - routineId, - ], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); + Invocation.method(#deleteRoutine, [id]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future deleteSlotEntry( - int? id, - int? routineId, - ) => + _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method( - #deleteSlotEntry, - [ - id, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetRepetitionUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future editSlotEntry( - _i8.SlotEntry? entry, - int? routineId, - ) => + _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method( - #editSlotEntry, - [ - entry, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#fetchAndSetWeightUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( - Invocation.method( - #getConfigUrl, - [type], - ), - returnValue: _i16.dummyValue( - this, - Invocation.method( - #getConfigUrl, - [type], - ), - ), - ) as String); - - @override - _i13.Future<_i9.BaseConfig> editConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #editConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#fetchAndSetUnits, []), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i9.BaseConfig> addConfig( - _i9.BaseConfig? config, - _i8.ConfigType? type, - ) => + _i13.Future<_i6.Day> addDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - returnValue: _i13.Future<_i9.BaseConfig>.value(_FakeBaseConfig_7( - this, - Invocation.method( - #addConfig, - [ - config, - type, - ], - ), - )), - ) as _i13.Future<_i9.BaseConfig>); + Invocation.method(#addDay, [day]), + returnValue: _i13.Future<_i6.Day>.value( + _FakeDay_4(this, Invocation.method(#addDay, [day])), + ), + ) + as _i13.Future<_i6.Day>); @override - _i13.Future deleteConfig( - int? id, - _i8.ConfigType? type, - ) => + _i13.Future editDay(_i6.Day? day) => (super.noSuchMethod( - Invocation.method( - #deleteConfig, - [ - id, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDay, [day]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future handleConfig( - _i8.SlotEntry? entry, - num? value, - _i8.ConfigType? type, - ) => + _i13.Future editDays(List<_i6.Day>? days) => (super.noSuchMethod( - Invocation.method( - #handleConfig, - [ - entry, - value, - type, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#editDays, [days]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future> fetchSessionData() => (super.noSuchMethod( - Invocation.method( - #fetchSessionData, - [], - ), - returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), - ) as _i13.Future>); - - @override - _i13.Future<_i10.WorkoutSession> addSession( - _i10.WorkoutSession? session, - int? routineId, - ) => + _i13.Future deleteDay(int? dayId) => (super.noSuchMethod( - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #addSession, - [ - session, - routineId, - ], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); + Invocation.method(#deleteDay, [dayId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override - _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => (super.noSuchMethod( - Invocation.method( - #editSession, - [session], - ), - returnValue: _i13.Future<_i10.WorkoutSession>.value(_FakeWorkoutSession_8( - this, - Invocation.method( - #editSession, - [session], - ), - )), - ) as _i13.Future<_i10.WorkoutSession>); - - @override - _i13.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValue: _i13.Future<_i11.Log>.value(_FakeLog_9( - this, - Invocation.method( - #addLog, - [log], - ), - )), - ) as _i13.Future<_i11.Log>); - - @override - _i13.Future deleteLog( - int? logId, - int? routineId, - ) => + _i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - routineId, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + Invocation.method(#addSlot, [slot, routineId]), + returnValue: _i13.Future<_i7.Slot>.value( + _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + ), + ) + as _i13.Future<_i7.Slot>); + + @override + _i13.Future deleteSlot(int? slotId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlot, [slotId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlot(_i7.Slot? slot, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlot, [slot, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlots(List<_i7.Slot>? slots, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlots, [slots, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _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])), + ), + ) + as _i13.Future<_i8.SlotEntry>); + + @override + _i13.Future deleteSlotEntry(int? id, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteSlotEntry, [id, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry, int? routineId) => + (super.noSuchMethod( + Invocation.method(#editSlotEntry, [entry, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + String getConfigUrl(_i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#getConfigUrl, [type]), + returnValue: _i16.dummyValue(this, Invocation.method(#getConfigUrl, [type])), + ) + as String); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _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])), + ), + ) + as _i13.Future<_i9.BaseConfig>); + + @override + _i13.Future deleteConfig(int? id, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#deleteConfig, [id, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future handleConfig(_i8.SlotEntry? entry, num? value, _i8.ConfigType? type) => + (super.noSuchMethod( + Invocation.method(#handleConfig, [entry, value, type]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); + + @override + _i13.Future> fetchSessionData() => + (super.noSuchMethod( + Invocation.method(#fetchSessionData, []), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), + ) + as _i13.Future>); + + @override + _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])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) => + (super.noSuchMethod( + Invocation.method(#editSession, [session]), + returnValue: _i13.Future<_i10.WorkoutSession>.value( + _FakeWorkoutSession_8(this, Invocation.method(#editSession, [session])), + ), + ) + as _i13.Future<_i10.WorkoutSession>); + + @override + _i13.Future<_i11.Log> addLog(_i11.Log? log) => + (super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValue: _i13.Future<_i11.Log>.value( + _FakeLog_9(this, Invocation.method(#addLog, [log])), + ), + ) + as _i13.Future<_i11.Log>); + + @override + _i13.Future deleteLog(int? logId, int? routineId) => + (super.noSuchMethod( + Invocation.method(#deleteLog, [logId, routineId]), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) + as _i13.Future); @override void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); } diff --git a/test/user/provider_test.mocks.dart b/test/user/provider_test.mocks.dart index 5f3d05d8..187bf7e8 100644 --- a/test/user/provider_test.mocks.dart +++ b/test/user/provider_test.mocks.dart @@ -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]. @@ -74,154 +50,95 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i3.Response>); } diff --git a/test/weight/weight_provider_test.mocks.dart b/test/weight/weight_provider_test.mocks.dart index 82c4496d..985b0d14 100644 --- a/test/weight/weight_provider_test.mocks.dart +++ b/test/weight/weight_provider_test.mocks.dart @@ -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]. @@ -74,154 +50,95 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { } @override - _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0( - this, - Invocation.getter(#auth), - ), - ) as _i2.AuthProvider); - - @override - _i3.Client get client => (super.noSuchMethod( - 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, - ); - - @override - set client(_i3.Client? value) => super.noSuchMethod( - Invocation.setter( - #client, - value, - ), - returnValueForMissingStub: null, - ); - - @override - Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #getDefaultHeaders, - [], - {#includeAuth: includeAuth}, - ), - returnValue: {}, - ) as Map); - - @override - Uri makeUrl( - String? path, { - int? id, - String? objectMethod, - Map? query, - }) => + _i2.AuthProvider get auth => (super.noSuchMethod( - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - returnValue: _FakeUri_2( - this, - Invocation.method( - #makeUrl, - [path], - { - #id: id, - #objectMethod: objectMethod, - #query: query, - }, - ), - ), - ) as Uri); + Invocation.getter(#auth), + returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + ) + as _i2.AuthProvider); @override - _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetch, - [uri], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method( - #fetchPaginated, - [uri], - ), - returnValue: _i5.Future>.value([]), - ) as _i5.Future>); - - @override - _i5.Future> post( - Map? data, - Uri? uri, - ) => + _i3.Client get client => (super.noSuchMethod( - Invocation.method( - #post, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.getter(#client), + returnValue: _FakeClient_1(this, Invocation.getter(#client)), + ) + as _i3.Client); @override - _i5.Future> patch( - Map? data, - Uri? uri, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - data, - uri, - ], - ), - returnValue: _i5.Future>.value({}), - ) as _i5.Future>); + set auth(_i2.AuthProvider? value) => + super.noSuchMethod(Invocation.setter(#auth, value), returnValueForMissingStub: null); @override - _i5.Future<_i3.Response> deleteRequest( - String? url, - int? id, - ) => + set client(_i3.Client? value) => + super.noSuchMethod(Invocation.setter(#client, value), returnValueForMissingStub: null); + + @override + Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - returnValue: _i5.Future<_i3.Response>.value(_FakeResponse_3( - this, - Invocation.method( - #deleteRequest, - [ - url, - id, - ], - ), - )), - ) as _i5.Future<_i3.Response>); + Invocation.method(#getDefaultHeaders, [], {#includeAuth: includeAuth}), + returnValue: {}, + ) + as Map); + + @override + Uri makeUrl(String? path, {int? id, String? objectMethod, Map? query}) => + (super.noSuchMethod( + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + returnValue: _FakeUri_2( + this, + Invocation.method( + #makeUrl, + [path], + {#id: id, #objectMethod: objectMethod, #query: query}, + ), + ), + ) + as Uri); + + @override + _i5.Future fetch(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetch, [uri]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future> fetchPaginated(Uri? uri) => + (super.noSuchMethod( + Invocation.method(#fetchPaginated, [uri]), + returnValue: _i5.Future>.value([]), + ) + as _i5.Future>); + + @override + _i5.Future> post(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#post, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future> patch(Map? data, Uri? uri) => + (super.noSuchMethod( + Invocation.method(#patch, [data, uri]), + returnValue: _i5.Future>.value({}), + ) + as _i5.Future>); + + @override + _i5.Future<_i3.Response> deleteRequest(String? url, int? id) => + (super.noSuchMethod( + Invocation.method(#deleteRequest, [url, id]), + returnValue: _i5.Future<_i3.Response>.value( + _FakeResponse_3(this, Invocation.method(#deleteRequest, [url, id])), + ), + ) + as _i5.Future<_i3.Response>); } diff --git a/test/weight/weight_screen_test.mocks.dart b/test/weight/weight_screen_test.mocks.dart index f0fb8ed9..264480d6 100644 --- a/test/weight/weight_screen_test.mocks.dart +++ b/test/weight/weight_screen_test.mocks.dart @@ -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]. @@ -125,144 +81,97 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + 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>[], - ) as List<_i3.WeightEntry>); + List<_i3.WeightEntry> get items => + (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); + 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 - _i3.WeightEntry findById(int? id) => (super.noSuchMethod( - Invocation.method( - #findById, - [id], - ), - returnValue: _FakeWeightEntry_1( - this, - Invocation.method( - #findById, - [id], - ), - ), - ) as _i3.WeightEntry); + _i3.WeightEntry findById(int? id) => + (super.noSuchMethod( + 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?); + _i3.WeightEntry? findByDate(DateTime? date) => + (super.noSuchMethod(Invocation.method(#findByDate, [date])) as _i3.WeightEntry?); @override - _i11.Future> fetchAndSetEntries() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetEntries, - [], - ), - returnValue: _i11.Future>.value(<_i3.WeightEntry>[]), - ) as _i11.Future>); + _i11.Future> fetchAndSetEntries() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetEntries, []), + returnValue: _i11.Future>.value(<_i3.WeightEntry>[]), + ) + as _i11.Future>); @override - _i11.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( - Invocation.method( - #addEntry, - [entry], - ), - returnValue: _i11.Future<_i3.WeightEntry>.value(_FakeWeightEntry_1( - this, - Invocation.method( - #addEntry, - [entry], - ), - )), - ) as _i11.Future<_i3.WeightEntry>); + _i11.Future<_i3.WeightEntry> addEntry(_i3.WeightEntry? entry) => + (super.noSuchMethod( + Invocation.method(#addEntry, [entry]), + returnValue: _i11.Future<_i3.WeightEntry>.value( + _FakeWeightEntry_1(this, Invocation.method(#addEntry, [entry])), + ), + ) + as _i11.Future<_i3.WeightEntry>); @override - _i11.Future editEntry(_i3.WeightEntry? entry) => (super.noSuchMethod( - Invocation.method( - #editEntry, - [entry], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future editEntry(_i3.WeightEntry? entry) => + (super.noSuchMethod( + Invocation.method(#editEntry, [entry]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future deleteEntry(int? id) => (super.noSuchMethod( - Invocation.method( - #deleteEntry, - [id], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future deleteEntry(int? id) => + (super.noSuchMethod( + Invocation.method(#deleteEntry, [id]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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]. @@ -274,145 +183,96 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider { } @override - _i14.ThemeMode get themeMode => (super.noSuchMethod( - Invocation.getter(#themeMode), - returnValue: _i14.ThemeMode.system, - ) as _i14.ThemeMode); + _i14.ThemeMode get themeMode => + (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), - ), - ) as _i2.WgerBaseProvider); + _i2.WgerBaseProvider get baseProvider => + (super.noSuchMethod( + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i4.SharedPreferencesAsync get prefs => (super.noSuchMethod( - Invocation.getter(#prefs), - returnValue: _FakeSharedPreferencesAsync_2( - this, - Invocation.getter(#prefs), - ), - ) as _i4.SharedPreferencesAsync); + _i4.SharedPreferencesAsync get prefs => + (super.noSuchMethod( + 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); + 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(_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 fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetProfile, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetProfile() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetProfile, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future saveProfile() => (super.noSuchMethod( - Invocation.method( - #saveProfile, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future saveProfile() => + (super.noSuchMethod( + Invocation.method(#saveProfile, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future verifyEmail() => (super.noSuchMethod( - Invocation.method( - #verifyEmail, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future verifyEmail() => + (super.noSuchMethod( + Invocation.method(#verifyEmail, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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]. @@ -424,268 +284,181 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans } @override - _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.getter(#baseProvider), - returnValue: _FakeWgerBaseProvider_0( - this, - Invocation.getter(#baseProvider), - ), - ) as _i2.WgerBaseProvider); - - @override - _i5.IngredientDatabase get database => (super.noSuchMethod( - 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>[], - ) as List<_i9.Ingredient>); - - @override - List<_i6.NutritionalPlan> get items => (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, - ); - - @override - 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); - - @override - 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], - ), - ), - ) as _i6.NutritionalPlan); - - @override - _i7.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( - #findMealById, - [id], - )) as _i7.Meal?); - - @override - _i11.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansSparse, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method( - #fetchAndSetAllPlansFull, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4( - this, - Invocation.method( - #fetchAndSetPlanSparse, - [planId], - ), - )), - ) as _i11.Future<_i6.NutritionalPlan>); - - @override - _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4( - this, - Invocation.method( - #fetchAndSetPlanFull, - [planId], - ), - )), - ) as _i11.Future<_i6.NutritionalPlan>); - - @override - _i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) => (super.noSuchMethod( - Invocation.method( - #addPlan, - [planData], - ), - returnValue: _i11.Future<_i6.NutritionalPlan>.value(_FakeNutritionalPlan_4( - this, - Invocation.method( - #addPlan, - [planData], - ), - )), - ) as _i11.Future<_i6.NutritionalPlan>); - - @override - _i11.Future editPlan(_i6.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #editPlan, - [plan], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future deletePlan(int? id) => (super.noSuchMethod( - Invocation.method( - #deletePlan, - [id], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future<_i7.Meal> addMeal( - _i7.Meal? meal, - int? planId, - ) => + _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - returnValue: _i11.Future<_i7.Meal>.value(_FakeMeal_5( - this, - Invocation.method( - #addMeal, - [ - meal, - planId, - ], - ), - )), - ) as _i11.Future<_i7.Meal>); + Invocation.getter(#baseProvider), + returnValue: _FakeWgerBaseProvider_0(this, Invocation.getter(#baseProvider)), + ) + as _i2.WgerBaseProvider); @override - _i11.Future<_i7.Meal> editMeal(_i7.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #editMeal, - [meal], - ), - returnValue: _i11.Future<_i7.Meal>.value(_FakeMeal_5( - this, - Invocation.method( - #editMeal, - [meal], - ), - )), - ) as _i11.Future<_i7.Meal>); - - @override - _i11.Future deleteMeal(_i7.Meal? meal) => (super.noSuchMethod( - Invocation.method( - #deleteMeal, - [meal], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - - @override - _i11.Future<_i8.MealItem> addMealItem( - _i8.MealItem? mealItem, - _i7.Meal? meal, - ) => + _i5.IngredientDatabase get database => (super.noSuchMethod( - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - returnValue: _i11.Future<_i8.MealItem>.value(_FakeMealItem_6( - this, - Invocation.method( - #addMealItem, - [ - mealItem, - meal, - ], - ), - )), - ) as _i11.Future<_i8.MealItem>); + Invocation.getter(#database), + returnValue: _FakeIngredientDatabase_3(this, Invocation.getter(#database)), + ) + as _i5.IngredientDatabase); @override - _i11.Future deleteMealItem(_i8.MealItem? mealItem) => (super.noSuchMethod( - Invocation.method( - #deleteMealItem, - [mealItem], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + List<_i9.Ingredient> get ingredients => + (super.noSuchMethod(Invocation.getter(#ingredients), returnValue: <_i9.Ingredient>[]) + as List<_i9.Ingredient>); @override - _i11.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method( - #clearIngredientCache, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + List<_i6.NutritionalPlan> get items => + (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); + + @override + 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); + + @override + 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])), + ) + as _i6.NutritionalPlan); + + @override + _i7.Meal? findMealById(int? id) => + (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i7.Meal?); + + @override + _i11.Future fetchAndSetAllPlansSparse() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansSparse, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future fetchAndSetAllPlansFull() => + (super.noSuchMethod( + Invocation.method(#fetchAndSetAllPlansFull, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanSparse(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanSparse, [planId]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4(this, Invocation.method(#fetchAndSetPlanSparse, [planId])), + ), + ) + as _i11.Future<_i6.NutritionalPlan>); + + @override + _i11.Future<_i6.NutritionalPlan> fetchAndSetPlanFull(int? planId) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetPlanFull, [planId]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4(this, Invocation.method(#fetchAndSetPlanFull, [planId])), + ), + ) + as _i11.Future<_i6.NutritionalPlan>); + + @override + _i11.Future<_i6.NutritionalPlan> addPlan(_i6.NutritionalPlan? planData) => + (super.noSuchMethod( + Invocation.method(#addPlan, [planData]), + returnValue: _i11.Future<_i6.NutritionalPlan>.value( + _FakeNutritionalPlan_4(this, Invocation.method(#addPlan, [planData])), + ), + ) + as _i11.Future<_i6.NutritionalPlan>); + + @override + _i11.Future editPlan(_i6.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#editPlan, [plan]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future deletePlan(int? id) => + (super.noSuchMethod( + Invocation.method(#deletePlan, [id]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future<_i7.Meal> addMeal(_i7.Meal? meal, int? planId) => + (super.noSuchMethod( + Invocation.method(#addMeal, [meal, planId]), + returnValue: _i11.Future<_i7.Meal>.value( + _FakeMeal_5(this, Invocation.method(#addMeal, [meal, planId])), + ), + ) + as _i11.Future<_i7.Meal>); + + @override + _i11.Future<_i7.Meal> editMeal(_i7.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#editMeal, [meal]), + returnValue: _i11.Future<_i7.Meal>.value( + _FakeMeal_5(this, Invocation.method(#editMeal, [meal])), + ), + ) + as _i11.Future<_i7.Meal>); + + @override + _i11.Future deleteMeal(_i7.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#deleteMeal, [meal]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future<_i8.MealItem> addMealItem(_i8.MealItem? mealItem, _i7.Meal? meal) => + (super.noSuchMethod( + Invocation.method(#addMealItem, [mealItem, meal]), + returnValue: _i11.Future<_i8.MealItem>.value( + _FakeMealItem_6(this, Invocation.method(#addMealItem, [mealItem, meal])), + ), + ) + as _i11.Future<_i8.MealItem>); + + @override + _i11.Future deleteMealItem(_i8.MealItem? mealItem) => + (super.noSuchMethod( + Invocation.method(#deleteMealItem, [mealItem]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); + + @override + _i11.Future clearIngredientCache() => + (super.noSuchMethod( + Invocation.method(#clearIngredientCache, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override _i11.Future<_i9.Ingredient> fetchIngredient( @@ -693,30 +466,24 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans _i5.IngredientDatabase? database, }) => (super.noSuchMethod( - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - returnValue: _i11.Future<_i9.Ingredient>.value(_FakeIngredient_7( - this, - Invocation.method( - #fetchIngredient, - [ingredientId], - {#database: database}, - ), - )), - ) as _i11.Future<_i9.Ingredient>); + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + returnValue: _i11.Future<_i9.Ingredient>.value( + _FakeIngredient_7( + this, + Invocation.method(#fetchIngredient, [ingredientId], {#database: database}), + ), + ), + ) + as _i11.Future<_i9.Ingredient>); @override - _i11.Future fetchIngredientsFromCache() => (super.noSuchMethod( - Invocation.method( - #fetchIngredientsFromCache, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchIngredientsFromCache() => + (super.noSuchMethod( + Invocation.method(#fetchIngredientsFromCache, []), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override _i11.Future> searchIngredient( @@ -725,42 +492,31 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans bool? searchEnglish = false, }) => (super.noSuchMethod( - Invocation.method( - #searchIngredient, - [name], - { - #languageCode: languageCode, - #searchEnglish: searchEnglish, - }, - ), - returnValue: _i11.Future>.value(<_i9.Ingredient>[]), - ) as _i11.Future>); + Invocation.method( + #searchIngredient, + [name], + {#languageCode: languageCode, #searchEnglish: searchEnglish}, + ), + returnValue: _i11.Future>.value(<_i9.Ingredient>[]), + ) + as _i11.Future>); @override - _i11.Future<_i9.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #searchIngredientWithBarcode, - [barcode], - ), - returnValue: _i11.Future<_i9.Ingredient?>.value(), - ) as _i11.Future<_i9.Ingredient?>); - - @override - _i11.Future logMealToDiary( - _i7.Meal? meal, - DateTime? mealDateTime, - ) => + _i11.Future<_i9.Ingredient?> searchIngredientWithBarcode(String? barcode) => (super.noSuchMethod( - Invocation.method( - #logMealToDiary, - [ - meal, - mealDateTime, - ], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + Invocation.method(#searchIngredientWithBarcode, [barcode]), + returnValue: _i11.Future<_i9.Ingredient?>.value(), + ) + as _i11.Future<_i9.Ingredient?>); + + @override + _i11.Future logMealToDiary(_i7.Meal? meal, DateTime? mealDateTime) => + (super.noSuchMethod( + Invocation.method(#logMealToDiary, [meal, mealDateTime]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override _i11.Future logIngredientToDiary( @@ -769,78 +525,47 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method( - #logIngredientToDiary, - [ - mealItem, - planId, - dateTime, - ], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + Invocation.method(#logIngredientToDiary, [mealItem, planId, dateTime]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future deleteLog( - int? logId, - int? planId, - ) => + _i11.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( - Invocation.method( - #deleteLog, - [ - logId, - planId, - ], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + Invocation.method(#deleteLog, [logId, planId]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override - _i11.Future fetchAndSetLogs(_i6.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method( - #fetchAndSetLogs, - [plan], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + _i11.Future fetchAndSetLogs(_i6.NutritionalPlan? plan) => + (super.noSuchMethod( + Invocation.method(#fetchAndSetLogs, [plan]), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) + as _i11.Future); @override void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + 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); }