From b66aa7444d4548a4470525bbe8768281e43b7d11 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Sun, 5 Jan 2025 19:45:02 +0100 Subject: [PATCH] Some polishing, adding missing fields and other QoL --- lib/l10n/app_en.arb | 21 ++++++-- lib/models/workouts/base_config.dart | 5 ++ lib/models/workouts/base_config.g.dart | 5 +- lib/models/workouts/slot_entry.dart | 20 +++++++ lib/models/workouts/slot_entry.g.dart | 8 +++ lib/providers/routines.dart | 54 +++++-------------- lib/widgets/routines/day.dart | 21 +++++--- lib/widgets/routines/forms.dart | 4 +- lib/widgets/routines/forms/day.dart | 20 +++++-- lib/widgets/routines/forms/slot.dart | 48 ++++++++++++++--- lib/widgets/routines/routine_detail.dart | 2 +- lib/widgets/routines/routine_edit.dart | 4 +- ...epetition_unit_form_widget_test.mocks.dart | 39 +++++--------- test/workout/workout_day_form_test.mocks.dart | 39 +++++--------- test/workout/workout_form_test.mocks.dart | 39 +++++--------- 15 files changed, 176 insertions(+), 153 deletions(-) diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 7cdbf84e..e17c51fa 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -179,9 +179,17 @@ }, "dayDescriptionHelp": "A description of what is done on this day (e.g. 'pull day') or what body parts are trained (e.g. 'chest and shoulders')", "@dayDescriptionHelp": {}, - "setNr": "Set {nr}", - "@setNr": { - "description": "Header in form indicating the number of the current set. Can also be translated as something like 'Set Nr. xy'.", + "exerciseNr": "Exercise {nr}", + "@exerciseNr": { + "description": "Header in form indicating the number of the current exercise. Can also be translated as something like 'Set Nr. xy'.", + "type": "text", + "placeholders": { + "nr": {} + } + }, + "supersetNr": "Superset {nr}", + "@supersetNr": { + "description": "Header in form indicating the number of the current exercise. Can also be translated as something like 'Superset Nr. xy'.", "type": "text", "placeholders": { "nr": {} @@ -207,7 +215,9 @@ }, "restDay": "Rest day", "isRestDay": "Is rest day", - "isRestDayHelp": "Please consider that all sets are removed from rest days when the form is saved", + "isRestDayHelp": "Please note that all sets and exercises will be removed when you mark a day as a rest day.", + "needsLogsToAdvance": "Needs logs to advance", + "needsLogsToAdvanceHelp": "Select if you want the routine to progress to the next scheduled day only if you've logged a workout for the day", "routineDays": "Days in routine", "resultingRoutine": "Resulting routine", "newDay": "New day", @@ -707,7 +717,7 @@ "language": "Language", "addExercise": "Add exercise", "fitInWeek": "Fit in week", - "fitInWeekHelp": "Select if you want to fit the workout days into a week, you can add e.g. three days and mark this checkbox.", + "fitInWeekHelp": "If enabled, the days will repeat in a weekly cycle, otherwise the days will follow sequentially without regards to the start of a new week.", "addSuperset": "Add superset", "setHasProgression": "Set has progression", "setHasProgressionWarning": "Please note that at the moment it is not possible to edit all settings for a set on the mobile application or configure automatic progression. For now, please use the web application.", @@ -735,6 +745,7 @@ } } }, + "progressionRules": "This exercise has progression rules and can't be edited on the mobile app. Please use the web application to edit this exercise.", "cacheWarning": "Due to caching it might take some time till the changes are visible throughout the application.", "textPromptTitle": "Ready to start?", "textPromptSubheading": "Press the action button to begin", diff --git a/lib/models/workouts/base_config.dart b/lib/models/workouts/base_config.dart index 3c259b99..73791bfe 100644 --- a/lib/models/workouts/base_config.dart +++ b/lib/models/workouts/base_config.dart @@ -47,6 +47,9 @@ class BaseConfig { @JsonKey(required: true, name: 'need_log_to_apply') late bool needLogToApply; + @JsonKey(required: true, name: 'requirements') + late dynamic requirements; + BaseConfig({ required this.id, required this.slotEntryId, @@ -56,6 +59,7 @@ class BaseConfig { required this.operation, required this.step, required this.needLogToApply, + required this.requirements, }); BaseConfig.firstIteration(this.value, this.slotEntryId) { @@ -63,6 +67,7 @@ class BaseConfig { operation = 'r'; step = 'abs'; needLogToApply = false; + requirements = null; } // Boilerplate diff --git a/lib/models/workouts/base_config.g.dart b/lib/models/workouts/base_config.g.dart index 85519e7c..aa5f7a11 100644 --- a/lib/models/workouts/base_config.g.dart +++ b/lib/models/workouts/base_config.g.dart @@ -16,7 +16,8 @@ BaseConfig _$BaseConfigFromJson(Map json) { 'value', 'operation', 'step', - 'need_log_to_apply' + 'need_log_to_apply', + 'requirements' ], ); return BaseConfig( @@ -27,6 +28,7 @@ BaseConfig _$BaseConfigFromJson(Map json) { operation: json['operation'] as String, step: json['step'] as String, needLogToApply: json['need_log_to_apply'] as bool, + requirements: json['requirements'], ); } @@ -37,4 +39,5 @@ Map _$BaseConfigToJson(BaseConfig instance) => nrOfSetsConfigs = []; + @JsonKey(required: false, name: 'max_set_nr_configs', includeToJson: false, defaultValue: []) + late List maxNrOfSetsConfigs = []; + @JsonKey(required: false, name: 'rir_configs', includeToJson: false, defaultValue: []) late List rirConfigs = []; + @JsonKey(required: false, name: 'max_rir_configs', includeToJson: false, defaultValue: []) + late List maxRirConfigs = []; + @JsonKey(required: false, name: 'rest_configs', includeToJson: false, defaultValue: []) late List restTimeConfigs = []; @@ -148,6 +154,20 @@ class SlotEntry { return 'DELETE ME! RIR'; } + bool get hasProgressionRules { + return weightConfigs.length > 1 || + repsConfigs.length > 1 || + maxRepsConfigs.length > 1 || + nrOfSetsConfigs.length > 1 || + maxNrOfSetsConfigs.length > 1 || + rirConfigs.length > 1 || + maxRirConfigs.length > 1 || + restTimeConfigs.length > 1 || + maxRestTimeConfigs.length > 1 || + maxWeightConfigs.length > 1 || + maxWeightConfigs.length > 1; + } + List getConfigsByType(ConfigType type) { switch (type) { case ConfigType.weight: diff --git a/lib/models/workouts/slot_entry.g.dart b/lib/models/workouts/slot_entry.g.dart index 6a21ba75..22f62004 100644 --- a/lib/models/workouts/slot_entry.g.dart +++ b/lib/models/workouts/slot_entry.g.dart @@ -55,10 +55,18 @@ SlotEntry _$SlotEntryFromJson(Map json) { ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [] + ..maxNrOfSetsConfigs = (json['max_set_nr_configs'] as List?) + ?.map((e) => BaseConfig.fromJson(e as Map)) + .toList() ?? + [] ..rirConfigs = (json['rir_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? [] + ..maxRirConfigs = (json['max_rir_configs'] as List?) + ?.map((e) => BaseConfig.fromJson(e as Map)) + .toList() ?? + [] ..restTimeConfigs = (json['rest_configs'] as List?) ?.map((e) => BaseConfig.fromJson(e as Map)) .toList() ?? diff --git a/lib/providers/routines.dart b/lib/providers/routines.dart index c49daeba..931ac13b 100644 --- a/lib/providers/routines.dart +++ b/lib/providers/routines.dart @@ -510,10 +510,10 @@ class RoutinesProvider with ChangeNotifier { notifyListeners(); } - Future editSlot(Slot workoutSet) async { + Future editSlot(Slot slot) async { await baseProvider.patch( - workoutSet.toJson(), - baseProvider.makeUrl(_slotsUrlPath, id: workoutSet.id), + slot.toJson(), + baseProvider.makeUrl(_slotsUrlPath, id: slot.id), ); notifyListeners(); } @@ -565,6 +565,15 @@ class RoutinesProvider with ChangeNotifier { notifyListeners(); } + Future editSlotEntry(SlotEntry entry) async { + await baseProvider.patch( + entry.toJson(), + baseProvider.makeUrl(_slotEntriesUrlPath, id: entry.id), + ); + + notifyListeners(); + } + String getConfigUrl(ConfigType type) { switch (type) { case ConfigType.sets: @@ -624,45 +633,6 @@ class RoutinesProvider with ChangeNotifier { } } - Future fetchComputedSettings(Slot slot) async { - final data = await baseProvider.fetch( - baseProvider.makeUrl( - _slotsUrlPath, - id: slot.id, - objectMethod: 'computed_settings', - ), - ); - - final List settings = []; - data['results'].forEach((e) { - final SlotEntry workoutSetting = SlotEntry.fromJson(e); - - workoutSetting.weightUnitObj = _weightUnits.firstWhere( - (unit) => unit.id == workoutSetting.weightUnitId, - ); - workoutSetting.repetitionUnitObj = _repetitionUnit.firstWhere( - (unit) => unit.id == workoutSetting.repetitionUnitId, - ); - settings.add(workoutSetting); - }); - - slot.settingsComputed = settings; - notifyListeners(); - } - - /* - * Setting - */ - Future addSetting(SlotEntry workoutSetting) async { - final data = await baseProvider.post( - workoutSetting.toJson(), - baseProvider.makeUrl(_slotEntriesUrlPath), - ); - final setting = SlotEntry.fromJson(data); - notifyListeners(); - return setting; - } - /* * Sessions */ diff --git a/lib/widgets/routines/day.dart b/lib/widgets/routines/day.dart index c3433701..4832a38c 100644 --- a/lib/widgets/routines/day.dart +++ b/lib/widgets/routines/day.dart @@ -72,8 +72,9 @@ class SetConfigDataWidget extends StatelessWidget { class RoutineDayWidget extends StatelessWidget { final DayData _dayData; final int _routineId; + final bool _viewMode; - const RoutineDayWidget(this._dayData, this._routineId); + const RoutineDayWidget(this._dayData, this._routineId, this._viewMode); Widget getSlotDataRow(SlotData slotData) { return Column( @@ -96,7 +97,7 @@ class RoutineDayWidget extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - DayHeader(day: _dayData, routineId: _routineId), + DayHeader(day: _dayData, routineId: _routineId, viewMode: _viewMode), ..._dayData.slots.map((e) => getSlotDataRow(e)), ], ), @@ -108,9 +109,11 @@ class RoutineDayWidget extends StatelessWidget { class DayHeader extends StatelessWidget { final DayData _dayData; final int _routineId; + final bool _viewMode; - const DayHeader({required DayData day, required int routineId}) + const DayHeader({required DayData day, required int routineId, bool viewMode = false}) : _dayData = day, + _viewMode = viewMode, _routineId = routineId; @override @@ -141,13 +144,15 @@ class DayHeader extends StatelessWidget { overflow: TextOverflow.ellipsis, ), subtitle: Text(_dayData.day!.description), - leading: const Icon(Icons.play_arrow), + leading: _viewMode ? null : const Icon(Icons.play_arrow), minLeadingWidth: 8, onTap: () { - Navigator.of(context).pushNamed( - GymModeScreen.routeName, - arguments: GymModeArguments(_routineId, _dayData.day!.id!, _dayData.iteration), - ); + _viewMode + ? null + : Navigator.of(context).pushNamed( + GymModeScreen.routeName, + arguments: GymModeArguments(_routineId, _dayData.day!.id!, _dayData.iteration), + ); }, ); } diff --git a/lib/widgets/routines/forms.dart b/lib/widgets/routines/forms.dart index f43736e2..3cb75de1 100644 --- a/lib/widgets/routines/forms.dart +++ b/lib/widgets/routines/forms.dart @@ -55,7 +55,7 @@ class ExerciseSetting extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ Text( - AppLocalizations.of(context).setNr(i + 1), + AppLocalizations.of(context).exerciseNr(i + 1), style: Theme.of(context).textTheme.titleLarge, ), Row( @@ -99,7 +99,7 @@ class ExerciseSetting extends StatelessWidget { textBaseline: TextBaseline.alphabetic, children: [ Text( - AppLocalizations.of(context).setNr(i + 1), + AppLocalizations.of(context).exerciseNr(i + 1), style: const TextStyle(fontWeight: FontWeight.bold), ), const SizedBox(width: 10), diff --git a/lib/widgets/routines/forms/day.dart b/lib/widgets/routines/forms/day.dart index 40071173..871b4b4c 100644 --- a/lib/widgets/routines/forms/day.dart +++ b/lib/widgets/routines/forms/day.dart @@ -164,6 +164,7 @@ class _DayFormWidgetState extends State { final descriptionController = TextEditingController(); final nameController = TextEditingController(); late bool isRestDay; + late bool needLogsToAdvance; final _form = GlobalKey(); @@ -171,6 +172,7 @@ class _DayFormWidgetState extends State { void initState() { super.initState(); isRestDay = widget.day.isRest; + needLogsToAdvance = widget.day.needLogsToAdvance; descriptionController.text = widget.day.description; nameController.text = widget.day.name; } @@ -238,11 +240,7 @@ class _DayFormWidgetState extends State { TextFormField( key: const Key('field-description'), enabled: !widget.day.isRest, - decoration: InputDecoration( - labelText: AppLocalizations.of(context).description, - helperText: AppLocalizations.of(context).dayDescriptionHelp, - helperMaxLines: 3, - ), + decoration: InputDecoration(labelText: AppLocalizations.of(context).description), controller: descriptionController, onSaved: (value) { widget.day.description = value!; @@ -261,6 +259,18 @@ class _DayFormWidgetState extends State { return null; }, ), + SwitchListTile( + title: Text(i18n.needsLogsToAdvance), + subtitle: Text(i18n.needsLogsToAdvanceHelp), + value: needLogsToAdvance, + contentPadding: const EdgeInsets.all(4), + onChanged: (value) { + setState(() { + needLogsToAdvance = value; + }); + widget.day.needLogsToAdvance = value; + }, + ), const SizedBox(height: 5), ElevatedButton( key: const Key(SUBMIT_BUTTON_KEY_NAME), diff --git a/lib/widgets/routines/forms/slot.dart b/lib/widgets/routines/forms/slot.dart index a090adc0..9bfefa66 100644 --- a/lib/widgets/routines/forms/slot.dart +++ b/lib/widgets/routines/forms/slot.dart @@ -20,12 +20,44 @@ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:provider/provider.dart'; import 'package:wger/helpers/consts.dart'; +import 'package:wger/models/exercises/exercise.dart'; import 'package:wger/models/workouts/day.dart'; import 'package:wger/models/workouts/slot.dart'; import 'package:wger/models/workouts/slot_entry.dart'; import 'package:wger/providers/routines.dart'; import 'package:wger/widgets/exercises/autocompleter.dart'; +class ProgressionRulesInfoBox extends StatelessWidget { + final Exercise exercise; + + const ProgressionRulesInfoBox(this.exercise, {super.key}); + + @override + Widget build(BuildContext context) { + final languageCode = Localizations.localeOf(context).languageCode; + final i18n = AppLocalizations.of(context); + + return Column( + children: [ + ListTile( + title: Text( + exercise.getExercise(languageCode).name, + style: Theme.of(context).textTheme.titleMedium, + ), + ), + ListTile( + leading: const Icon(Icons.info), + tileColor: Theme.of(context).colorScheme.primaryContainer, + title: Text( + i18n.progressionRules, + style: Theme.of(context).textTheme.bodySmall, + ), + ), + ], + ); + } +} + class SlotEntryForm extends StatefulWidget { final SlotEntry entry; @@ -176,6 +208,7 @@ class _SlotEntryFormState extends State { repsController.text, ConfigType.reps, ); + provider.editSlotEntry(widget.entry); }, ), const SizedBox(height: 10), @@ -204,7 +237,9 @@ class _SlotDetailWidgetState extends State { return Column( children: [ - ...widget.slot.entries.map((entry) => SlotEntryForm(entry)), + ...widget.slot.entries.map((entry) => entry.hasProgressionRules + ? ProgressionRulesInfoBox(entry.exerciseObj) + : SlotEntryForm(entry)), const SizedBox(height: 10), if (_addSuperset || widget.slot.entries.isEmpty) ExerciseAutocompleter( @@ -219,13 +254,15 @@ class _SlotDetailWidgetState extends State { await provider.addSlotEntry(entry); }, ), - FilledButton( + if (widget.slot.entries.isNotEmpty) + FilledButton( onPressed: () { setState(() { _addSuperset = !_addSuperset; }); }, - child: Text(i18n.addSuperset)), + child: Text(i18n.addSuperset), + ), const SizedBox(height: 5), ], ); @@ -283,8 +320,7 @@ class _SlotFormWidgetStateNg extends State { child: Column( children: [ ListTile( - // title: Text(slot.id.toString()), - title: Text(i18n.setNr(index + 1)), + title: Text(i18n.exerciseNr(index + 1)), tileColor: isCurrentSlotSelected ? Theme.of(context).highlightColor : null, leading: selectedSlotId == null ? ReorderableDragStartListener( @@ -353,7 +389,7 @@ class _SlotFormWidgetStateNg extends State { ListTile( leading: const Icon(Icons.add), title: Text( - i18n.addSet, + i18n.addExercise, style: Theme.of(context).textTheme.titleMedium, ), onTap: () async { diff --git a/lib/widgets/routines/routine_detail.dart b/lib/widgets/routines/routine_detail.dart index 4fb99e3c..cdf29ae7 100644 --- a/lib/widgets/routines/routine_detail.dart +++ b/lib/widgets/routines/routine_detail.dart @@ -38,7 +38,7 @@ class RoutineDetail extends StatelessWidget { ), ..._routine.dayDataCurrentIteration .where((dayData) => dayData.day != null) - .map((dayData) => RoutineDayWidget(dayData, _routine.id!)), + .map((dayData) => RoutineDayWidget(dayData, _routine.id!, viewMode)), ], ); } diff --git a/lib/widgets/routines/routine_edit.dart b/lib/widgets/routines/routine_edit.dart index 2f60f821..ffed9f65 100644 --- a/lib/widgets/routines/routine_edit.dart +++ b/lib/widgets/routines/routine_edit.dart @@ -72,7 +72,7 @@ class _RoutineEditState extends State { ), ReorderableDaysList( routineId: widget._routine.id!, - days: widget._routine.days, + days: widget._routine.days.where((day) => day.id != null).toList(), selectedDayId: selectedDayId, onDaySelected: (id) { setState(() { @@ -115,7 +115,7 @@ class _RoutineEditState extends State { ), ); } else if (snapshot.hasData) { - return RoutineDetail(snapshot.data!); + return RoutineDetail(snapshot.data!, viewMode: true); } return const Text('No data available'); }, diff --git a/test/workout/repetition_unit_form_widget_test.mocks.dart b/test/workout/repetition_unit_form_widget_test.mocks.dart index 9624b414..54c3c2e1 100644 --- a/test/workout/repetition_unit_form_widget_test.mocks.dart +++ b/test/workout/repetition_unit_form_widget_test.mocks.dart @@ -471,10 +471,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i13.Future); @override - _i13.Future editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod( + _i13.Future editSlot(_i7.Slot? slot) => (super.noSuchMethod( Invocation.method( #editSlot, - [workoutSet], + [slot], ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), @@ -515,6 +515,16 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry) => (super.noSuchMethod( + Invocation.method( + #editSlotEntry, + [entry], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); + @override String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( Invocation.method( @@ -616,31 +626,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); - @override - _i13.Future fetchComputedSettings(_i7.Slot? slot) => (super.noSuchMethod( - Invocation.method( - #fetchComputedSettings, - [slot], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i8.SlotEntry> addSetting(_i8.SlotEntry? workoutSetting) => (super.noSuchMethod( - Invocation.method( - #addSetting, - [workoutSetting], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSetting, - [workoutSetting], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); - @override _i13.Future fetchSessionData() => (super.noSuchMethod( Invocation.method( diff --git a/test/workout/workout_day_form_test.mocks.dart b/test/workout/workout_day_form_test.mocks.dart index e396335e..3f296f71 100644 --- a/test/workout/workout_day_form_test.mocks.dart +++ b/test/workout/workout_day_form_test.mocks.dart @@ -471,10 +471,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i13.Future); @override - _i13.Future editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod( + _i13.Future editSlot(_i7.Slot? slot) => (super.noSuchMethod( Invocation.method( #editSlot, - [workoutSet], + [slot], ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), @@ -515,6 +515,16 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry) => (super.noSuchMethod( + Invocation.method( + #editSlotEntry, + [entry], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); + @override String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( Invocation.method( @@ -616,31 +626,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); - @override - _i13.Future fetchComputedSettings(_i7.Slot? slot) => (super.noSuchMethod( - Invocation.method( - #fetchComputedSettings, - [slot], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i8.SlotEntry> addSetting(_i8.SlotEntry? workoutSetting) => (super.noSuchMethod( - Invocation.method( - #addSetting, - [workoutSetting], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSetting, - [workoutSetting], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); - @override _i13.Future fetchSessionData() => (super.noSuchMethod( Invocation.method( diff --git a/test/workout/workout_form_test.mocks.dart b/test/workout/workout_form_test.mocks.dart index 4e657fe0..b3acf78d 100644 --- a/test/workout/workout_form_test.mocks.dart +++ b/test/workout/workout_form_test.mocks.dart @@ -471,10 +471,10 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i13.Future); @override - _i13.Future editSlot(_i7.Slot? workoutSet) => (super.noSuchMethod( + _i13.Future editSlot(_i7.Slot? slot) => (super.noSuchMethod( Invocation.method( #editSlot, - [workoutSet], + [slot], ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), @@ -515,6 +515,16 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); + @override + _i13.Future editSlotEntry(_i8.SlotEntry? entry) => (super.noSuchMethod( + Invocation.method( + #editSlotEntry, + [entry], + ), + returnValue: _i13.Future.value(), + returnValueForMissingStub: _i13.Future.value(), + ) as _i13.Future); + @override String getConfigUrl(_i8.ConfigType? type) => (super.noSuchMethod( Invocation.method( @@ -616,31 +626,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); - @override - _i13.Future fetchComputedSettings(_i7.Slot? slot) => (super.noSuchMethod( - Invocation.method( - #fetchComputedSettings, - [slot], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - - @override - _i13.Future<_i8.SlotEntry> addSetting(_i8.SlotEntry? workoutSetting) => (super.noSuchMethod( - Invocation.method( - #addSetting, - [workoutSetting], - ), - returnValue: _i13.Future<_i8.SlotEntry>.value(_FakeSlotEntry_6( - this, - Invocation.method( - #addSetting, - [workoutSetting], - ), - )), - ) as _i13.Future<_i8.SlotEntry>); - @override _i13.Future fetchSessionData() => (super.noSuchMethod( Invocation.method(