From 9ebaf58fea299d99e8acd57781f9a64eb8ff866f Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Sat, 3 May 2025 15:29:59 +0200 Subject: [PATCH 1/4] Refactor routine handling for the dashboard widgets This makes sure that edits to the routine (such as changing the order of the days, etc.) are properly reflected in the dashboard. --- lib/providers/routines.dart | 53 +- lib/screens/dashboard.dart | 7 +- lib/screens/home_tabs_screen.dart | 67 +- lib/widgets/dashboard/widgets.dart | 581 ---------- .../dashboard/widgets/measurements.dart | 143 +++ .../dashboard/widgets/nothing_found.dart | 57 + lib/widgets/dashboard/widgets/nutrition.dart | 132 +++ lib/widgets/dashboard/widgets/routines.dart | 205 ++++ lib/widgets/dashboard/widgets/weight.dart | 121 +++ lib/widgets/routines/routines_list.dart | 4 +- test/auth/auth_screen_test.mocks.dart | 222 ++-- test/core/settings_test.mocks.dart | 994 +++++++++++++----- .../contribute_exercise_test.mocks.dart | 497 ++++++--- .../exercises_detail_widget_test.mocks.dart | 310 ++++-- test/gallery/gallery_form_test.mocks.dart | 223 +++- test/gallery/gallery_screen_test.mocks.dart | 223 +++- ...surement_categories_screen_test.mocks.dart | 138 ++- .../measurement_provider_test.mocks.dart | 147 ++- .../nutritional_meal_form_test.mocks.dart | 344 ++++-- .../nutritional_plan_form_test.mocks.dart | 344 ++++-- .../nutritional_plan_screen_test.mocks.dart | 595 +++++++---- .../nutritional_plans_screen_test.mocks.dart | 595 +++++++---- test/other/base_provider_test.mocks.dart | 222 ++-- test/user/provider_test.mocks.dart | 147 ++- test/weight/weight_provider_test.mocks.dart | 147 ++- test/weight/weight_screen_test.mocks.dart | 519 ++++++--- test/workout/day_form_test.mocks.dart | 589 ++++++++--- test/workout/gym_mode_screen_test.mocks.dart | 450 ++++++-- .../gym_mode_session_screen_test.mocks.dart | 589 ++++++++--- ...epetition_unit_form_widget_test.mocks.dart | 589 ++++++++--- .../routine_edit_screen_test.mocks.dart | 589 ++++++++--- test/workout/routine_edit_test.mocks.dart | 589 ++++++++--- test/workout/routine_form_test.mocks.dart | 589 ++++++++--- .../routine_logs_screen_test.mocks.dart | 589 ++++++++--- test/workout/routine_screen_test.mocks.dart | 147 ++- .../workout/routines_provider_test.mocks.dart | 450 ++++++-- test/workout/routines_screen_test.mocks.dart | 147 ++- test/workout/slot_entry_form_test.mocks.dart | 589 ++++++++--- .../weight_unit_form_widget_test.mocks.dart | 589 ++++++++--- 39 files changed, 9803 insertions(+), 3729 deletions(-) delete mode 100644 lib/widgets/dashboard/widgets.dart create mode 100644 lib/widgets/dashboard/widgets/measurements.dart create mode 100644 lib/widgets/dashboard/widgets/nothing_found.dart create mode 100644 lib/widgets/dashboard/widgets/nutrition.dart create mode 100644 lib/widgets/dashboard/widgets/routines.dart create mode 100644 lib/widgets/dashboard/widgets/weight.dart diff --git a/lib/providers/routines.dart b/lib/providers/routines.dart index d61310df7..04b161ffa 100644 --- a/lib/providers/routines.dart +++ b/lib/providers/routines.dart @@ -63,7 +63,7 @@ class RoutinesProvider with ChangeNotifier { static const _routineConfigRestTime = 'rest-config'; static const _routineConfigMaxRestTime = 'max-rest-config'; - Routine? _currentRoutine; + Routine? activeRoutine; late ExercisesProvider _exerciseProvider; final WgerBaseProvider baseProvider; List _routines = []; @@ -97,7 +97,7 @@ class RoutinesProvider with ChangeNotifier { /// Clears all lists void clear() { - _currentRoutine = null; + activeRoutine = null; _routines = []; _weightUnits = []; _repetitionUnits = []; @@ -138,28 +138,14 @@ class RoutinesProvider with ChangeNotifier { return _routines.indexWhere((routine) => routine.id == id); } - /// Set the currently "active" workout plan - void setCurrentPlan(int id) { - _currentRoutine = findById(id); - } - - /// Returns the currently "active" workout plan - Routine? get currentRoutine { - return _currentRoutine; - } - - /// Reset the currently "active" workout plan to null - void resetCurrentRoutine() { - _currentRoutine = null; - } - - /// Returns the current active workout plan. At the moment this is just - /// the latest, but this might change in the future. - Routine? get activeRoutine { + /// Sets the current active routine. At the moment this is just the latest, + /// but this might change in the future. + void setActiveRoutine() { if (_routines.isNotEmpty) { - return _routines.first; + activeRoutine = _routines.first; + } else { + activeRoutine = null; } - return null; } /* @@ -179,12 +165,13 @@ class RoutinesProvider with ChangeNotifier { await fetchAndSetRoutineFull(entry['id']); } + setActiveRoutine(); notifyListeners(); } - /// Fetches all workout plan sparsely, i.e. only with the data on the plan - /// object itself and no child attributes - Future fetchAndSetAllPlansSparse() async { + /// Fetches all routines sparsely, i.e. only with the data on the object itself + /// and no child attributes + Future fetchAndSetAllRoutinesSparse() async { final data = await baseProvider.fetch( baseProvider.makeUrl(_routinesUrlPath, query: {'limit': '1000', 'is_template': 'false'}), ); @@ -194,7 +181,7 @@ class RoutinesProvider with ChangeNotifier { _routines.add(plan); } - // _workoutPlans.sort((a, b) => b.created.compareTo(a.created)); + setActiveRoutine(); notifyListeners(); } @@ -216,18 +203,19 @@ class RoutinesProvider with ChangeNotifier { } } - /// Fetches a workout plan sparsely, i.e. only with the data on the plan - /// object itself and no child attributes + /// Fetches a routine sparsely, i.e. only with the data on the object itself + /// and no child attributes Future fetchAndSetRoutineSparse(int planId) async { final fullPlanData = await baseProvider.fetch( baseProvider.makeUrl(_routinesUrlPath, id: planId), ); - final plan = Routine.fromJson(fullPlanData); - _routines.add(plan); + final routine = Routine.fromJson(fullPlanData); + _routines.add(routine); _routines.sort((a, b) => b.created.compareTo(a.created)); + setActiveRoutine(); notifyListeners(); - return plan; + return routine; } /// Fetches a workout plan fully, i.e. with all corresponding child attributes @@ -306,7 +294,7 @@ class RoutinesProvider with ChangeNotifier { routine.dayDataGym = dayDataEntriesGym; // Logs - routine.sessions = List.from(sessionDataEntries); + routine.sessions = List.of(sessionDataEntries); for (final session in routine.sessions) { for (final log in session.logs) { if (log.weightUnitId != null) { @@ -327,6 +315,7 @@ class RoutinesProvider with ChangeNotifier { _routines.add(routine); } + setActiveRoutine(); notifyListeners(); return routine; } diff --git a/lib/screens/dashboard.dart b/lib/screens/dashboard.dart index adf35f5a1..06bae73e0 100644 --- a/lib/screens/dashboard.dart +++ b/lib/screens/dashboard.dart @@ -20,7 +20,10 @@ import 'package:flutter/material.dart'; import 'package:wger/l10n/generated/app_localizations.dart'; import 'package:wger/widgets/core/app_bar.dart'; import 'package:wger/widgets/dashboard/calendar.dart'; -import 'package:wger/widgets/dashboard/widgets.dart'; +import 'package:wger/widgets/dashboard/widgets/measurements.dart'; +import 'package:wger/widgets/dashboard/widgets/nutrition.dart'; +import 'package:wger/widgets/dashboard/widgets/routines.dart'; +import 'package:wger/widgets/dashboard/widgets/weight.dart'; class DashboardScreen extends StatelessWidget { const DashboardScreen(); @@ -35,7 +38,7 @@ class DashboardScreen extends StatelessWidget { padding: EdgeInsets.all(10), child: Column( children: [ - DashboardWorkoutWidget(), + DashboardRoutineWidget(), DashboardNutritionWidget(), DashboardWeightWidget(), DashboardMeasurementWidget(), diff --git a/lib/screens/home_tabs_screen.dart b/lib/screens/home_tabs_screen.dart index 22ac70c53..1ba515598 100644 --- a/lib/screens/home_tabs_screen.dart +++ b/lib/screens/home_tabs_screen.dart @@ -106,7 +106,7 @@ class _HomeTabsScreenState extends State with SingleTickerProvid await Future.wait([ galleryProvider.fetchAndSetGallery(), nutritionPlansProvider.fetchAndSetAllPlansSparse(), - routinesProvider.fetchAndSetAllPlansSparse(), + routinesProvider.fetchAndSetAllRoutinesSparse(), // routinesProvider.fetchAndSetAllRoutinesFull(), weightProvider.fetchAndSetEntries(), measurementProvider.fetchAndSetAllCategoriesAndEntries(), @@ -128,12 +128,11 @@ class _HomeTabsScreenState extends State with SingleTickerProvid widget._logger.warning(e.toString()); } - // Current workout plan + // Current routine widget._logger.info('Loading current routine'); if (routinesProvider.activeRoutine != null) { final planId = routinesProvider.activeRoutine!.id!; await routinesProvider.fetchAndSetRoutineFull(planId); - routinesProvider.setCurrentPlan(planId); } } @@ -149,38 +148,38 @@ class _HomeTabsScreenState extends State with SingleTickerProvid return const Scaffold( body: LoadingWidget(), ); - } else { - return Scaffold( - body: _screenList.elementAt(_selectedIndex), - bottomNavigationBar: NavigationBar( - destinations: [ - NavigationDestination( - icon: const Icon(Icons.home), - label: AppLocalizations.of(context).labelDashboard, - ), - NavigationDestination( - icon: const Icon(Icons.fitness_center), - label: AppLocalizations.of(context).labelBottomNavWorkout, - ), - NavigationDestination( - icon: const Icon(Icons.restaurant), - label: AppLocalizations.of(context).labelBottomNavNutrition, - ), - NavigationDestination( - icon: const FaIcon(FontAwesomeIcons.weightScale, size: 20), - label: AppLocalizations.of(context).weight, - ), - NavigationDestination( - icon: const Icon(Icons.photo_library), - label: AppLocalizations.of(context).gallery, - ), - ], - onDestinationSelected: _onItemTapped, - selectedIndex: _selectedIndex, - labelBehavior: NavigationDestinationLabelBehavior.alwaysHide, - ), - ); } + + return Scaffold( + body: _screenList.elementAt(_selectedIndex), + bottomNavigationBar: NavigationBar( + destinations: [ + NavigationDestination( + icon: const Icon(Icons.home), + label: AppLocalizations.of(context).labelDashboard, + ), + NavigationDestination( + icon: const Icon(Icons.fitness_center), + label: AppLocalizations.of(context).labelBottomNavWorkout, + ), + NavigationDestination( + icon: const Icon(Icons.restaurant), + label: AppLocalizations.of(context).labelBottomNavNutrition, + ), + NavigationDestination( + icon: const FaIcon(FontAwesomeIcons.weightScale, size: 20), + label: AppLocalizations.of(context).weight, + ), + NavigationDestination( + icon: const Icon(Icons.photo_library), + label: AppLocalizations.of(context).gallery, + ), + ], + onDestinationSelected: _onItemTapped, + selectedIndex: _selectedIndex, + labelBehavior: NavigationDestinationLabelBehavior.alwaysHide, + ), + ); }, ); } diff --git a/lib/widgets/dashboard/widgets.dart b/lib/widgets/dashboard/widgets.dart deleted file mode 100644 index 89f2c48a2..000000000 --- a/lib/widgets/dashboard/widgets.dart +++ /dev/null @@ -1,581 +0,0 @@ -/* - * This file is part of wger Workout Manager . - * Copyright (C) 2020, 2021 wger Team - * - * wger Workout Manager is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * wger Workout Manager is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -import 'package:carousel_slider/carousel_slider.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_svg_icons/flutter_svg_icons.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:intl/intl.dart'; -import 'package:provider/provider.dart'; -import 'package:wger/helpers/misc.dart'; -import 'package:wger/l10n/generated/app_localizations.dart'; -import 'package:wger/models/nutrition/nutritional_plan.dart'; -import 'package:wger/models/workouts/routine.dart'; -import 'package:wger/providers/body_weight.dart'; -import 'package:wger/providers/measurement.dart'; -import 'package:wger/providers/nutrition.dart'; -import 'package:wger/providers/routines.dart'; -import 'package:wger/providers/user.dart'; -import 'package:wger/screens/form_screen.dart'; -import 'package:wger/screens/gym_mode.dart'; -import 'package:wger/screens/log_meals_screen.dart'; -import 'package:wger/screens/measurement_categories_screen.dart'; -import 'package:wger/screens/nutritional_plan_screen.dart'; -import 'package:wger/screens/routine_screen.dart'; -import 'package:wger/screens/weight_screen.dart'; -import 'package:wger/theme/theme.dart'; -import 'package:wger/widgets/core/core.dart'; -import 'package:wger/widgets/measurements/categories_card.dart'; -import 'package:wger/widgets/measurements/charts.dart'; -import 'package:wger/widgets/measurements/forms.dart'; -import 'package:wger/widgets/measurements/helpers.dart'; -import 'package:wger/widgets/nutrition/charts.dart'; -import 'package:wger/widgets/nutrition/forms.dart'; -import 'package:wger/widgets/routines/forms/routine.dart'; -import 'package:wger/widgets/weight/forms.dart'; - -class DashboardNutritionWidget extends StatefulWidget { - const DashboardNutritionWidget(); - - @override - _DashboardNutritionWidgetState createState() => _DashboardNutritionWidgetState(); -} - -class _DashboardNutritionWidgetState extends State { - NutritionalPlan? _plan; - bool _hasContent = false; - - @override - void initState() { - super.initState(); - _plan = Provider.of(context, listen: false).currentPlan; - _hasContent = _plan != null; - } - - @override - Widget build(BuildContext context) { - return Card( - child: Column( - children: [ - ListTile( - title: Text( - _hasContent ? _plan!.description : AppLocalizations.of(context).nutritionalPlan, - style: Theme.of(context).textTheme.headlineSmall, - ), - subtitle: Text( - _hasContent - ? DateFormat.yMd(Localizations.localeOf(context).languageCode) - .format(_plan!.creationDate) - : '', - ), - leading: Icon( - Icons.restaurant, - color: Theme.of(context).textTheme.headlineSmall!.color, - ), - ), - if (_hasContent) - Padding( - padding: const EdgeInsets.symmetric(horizontal: 10), - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 15), - child: FlNutritionalPlanGoalWidget(nutritionalPlan: _plan!), - ), - ) - else - NothingFound( - AppLocalizations.of(context).noNutritionalPlans, - AppLocalizations.of(context).newNutritionalPlan, - PlanForm(), - ), - if (_hasContent) - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - TextButton( - child: Text(AppLocalizations.of(context).goToDetailPage), - onPressed: () { - Navigator.of(context).pushNamed( - NutritionalPlanScreen.routeName, - arguments: _plan, - ); - }, - ), - Expanded(child: Container()), - IconButton( - icon: const SvgIcon( - icon: SvgIconData('assets/icons/ingredient-diary.svg'), - ), - tooltip: AppLocalizations.of(context).logIngredient, - onPressed: () { - Navigator.pushNamed( - context, - FormScreen.routeName, - arguments: FormScreenArguments( - AppLocalizations.of(context).logIngredient, - IngredientLogForm(_plan!), - hasListView: true, - ), - ); - }, - ), - IconButton( - icon: const SvgIcon( - icon: SvgIconData('assets/icons/meal-diary.svg'), - ), - tooltip: AppLocalizations.of(context).logMeal, - onPressed: () { - Navigator.of(context).pushNamed(LogMealsScreen.routeName, arguments: _plan); - }, - ), - ], - ), - ], - ), - ); - } -} - -class DashboardWeightWidget extends StatelessWidget { - const DashboardWeightWidget(); - - @override - Widget build(BuildContext context) { - final profile = context.read().profile; - final weightProvider = context.read(); - - final (entriesAll, entries7dAvg) = sensibleRange( - weightProvider.items.map((e) => MeasurementChartEntry(e.weight, e.date)).toList(), - ); - - return Consumer( - builder: (context, workoutProvider, child) => Card( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - ListTile( - title: Text( - AppLocalizations.of(context).weight, - style: Theme.of(context).textTheme.headlineSmall, - ), - leading: FaIcon( - FontAwesomeIcons.weightScale, - color: Theme.of(context).textTheme.headlineSmall!.color, - ), - ), - Column( - children: [ - if (weightProvider.items.isNotEmpty) - Column( - children: [ - SizedBox( - height: 200, - child: MeasurementChartWidgetFl( - entriesAll, - weightUnit(profile!.isMetric, context), - avgs: entries7dAvg, - ), - ), - if (entries7dAvg.isNotEmpty) - MeasurementOverallChangeWidget( - entries7dAvg.first, - entries7dAvg.last, - weightUnit(profile.isMetric, context), - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - TextButton( - child: Text( - AppLocalizations.of(context).goToDetailPage, - ), - onPressed: () { - Navigator.of(context).pushNamed(WeightScreen.routeName); - }, - ), - IconButton( - icon: const Icon(Icons.add), - onPressed: () { - Navigator.pushNamed( - context, - FormScreen.routeName, - arguments: FormScreenArguments( - AppLocalizations.of(context).newEntry, - WeightForm(weightProvider - .getNewestEntry() - ?.copyWith(id: null, date: DateTime.now())), - ), - ); - }, - ), - ], - ), - ], - ) - else - NothingFound( - AppLocalizations.of(context).noWeightEntries, - AppLocalizations.of(context).newEntry, - WeightForm(), - ), - ], - ), - ], - ), - ), - ); - } -} - -class DashboardMeasurementWidget extends StatefulWidget { - const DashboardMeasurementWidget(); - - @override - _DashboardMeasurementWidgetState createState() => _DashboardMeasurementWidgetState(); -} - -class _DashboardMeasurementWidgetState extends State { - int _current = 0; - final _controller = CarouselSliderController(); - - @override - Widget build(BuildContext context) { - final provider = Provider.of(context, listen: false); - - final items = - provider.categories.map((item) => CategoriesCard(item, elevation: 0)).toList(); - if (items.isNotEmpty) { - items.add( - NothingFound( - AppLocalizations.of(context).moreMeasurementEntries, - AppLocalizations.of(context).newEntry, - MeasurementCategoryForm(), - ), - ); - } - return Consumer( - builder: (context, workoutProvider, child) => Card( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - ListTile( - title: Text( - AppLocalizations.of(context).measurements, - style: Theme.of(context).textTheme.headlineSmall, - ), - leading: FaIcon( - FontAwesomeIcons.chartLine, - color: Theme.of(context).textTheme.headlineSmall!.color, - ), - // TODO: this icon feels out of place and inconsistent with all - // other dashboard widgets. - // maybe we should just add a "Go to all" at the bottom of the widget - trailing: IconButton( - icon: const Icon(Icons.arrow_forward), - onPressed: () => Navigator.pushNamed( - context, - MeasurementCategoriesScreen.routeName, - ), - ), - ), - Column( - children: [ - if (items.isNotEmpty) - Column( - children: [ - CarouselSlider( - items: items, - carouselController: _controller, - options: CarouselOptions( - autoPlay: false, - enlargeCenterPage: false, - viewportFraction: 1, - enableInfiniteScroll: false, - aspectRatio: 1.1, - onPageChanged: (index, reason) { - setState(() { - _current = index; - }); - }, - ), - ), - Padding( - padding: const EdgeInsets.only(bottom: 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: items.asMap().entries.map((entry) { - return GestureDetector( - onTap: () => _controller.animateToPage(entry.key), - child: Container( - width: 12.0, - height: 12.0, - margin: const EdgeInsets.symmetric( - vertical: 8.0, - horizontal: 4.0, - ), - decoration: BoxDecoration( - shape: BoxShape.circle, - color: - Theme.of(context).textTheme.headlineSmall!.color!.withOpacity( - _current == entry.key ? 0.9 : 0.4, - ), - ), - ), - ); - }).toList(), - ), - ), - ], - ) - else - NothingFound( - AppLocalizations.of(context).noMeasurementEntries, - AppLocalizations.of(context).newEntry, - MeasurementCategoryForm(), - ), - ], - ), - ], - ), - ), - ); - } -} - -class DashboardWorkoutWidget extends StatefulWidget { - const DashboardWorkoutWidget(); - - @override - _DashboardWorkoutWidgetState createState() => _DashboardWorkoutWidgetState(); -} - -class _DashboardWorkoutWidgetState extends State { - var _showDetail = false; - bool _hasContent = false; - - Routine? _routine; - - @override - void initState() { - super.initState(); - _routine = context.read().activeRoutine; - _hasContent = _routine != null; - } - - List getContent() { - final List out = []; - - if (!_hasContent) { - return out; - } - - for (final dayData in _routine!.dayDataCurrentIteration) { - if (dayData.day == null) { - continue; - } - - out.add(SizedBox( - width: double.infinity, - child: Row( - children: [ - if (dayData.date.isSameDayAs(DateTime.now())) const Icon(Icons.today), - Expanded( - child: Text( - dayData.day == null || dayData.day!.isRest - ? AppLocalizations.of(context).restDay - : dayData.day!.name, - style: const TextStyle(fontWeight: FontWeight.bold), - overflow: TextOverflow.ellipsis, - ), - ), - Expanded( - child: MutedText( - dayData.day != null ? dayData.day!.description : '', - textAlign: TextAlign.right, - overflow: TextOverflow.ellipsis, - ), - ), - if (dayData.day == null || dayData.day!.isRest) - const Icon(Icons.hotel) - else - IconButton( - icon: const Icon(Icons.play_arrow), - color: wgerPrimaryButtonColor, - onPressed: () { - Navigator.of(context).pushNamed( - GymModeScreen.routeName, - arguments: GymModeArguments(_routine!.id!, dayData.day!.id!, dayData.iteration), - ); - }, - ), - ], - ), - )); - - for (final slotData in dayData.slots) { - out.add(SizedBox( - width: double.infinity, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ...slotData.setConfigs.map( - (s) => _showDetail - ? Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(s.exercise - .getTranslation(Localizations.localeOf(context).languageCode) - .name), - const SizedBox(width: 10), - Expanded( - child: MutedText(s.textRepr, overflow: TextOverflow.ellipsis), - ), - ], - ), - const SizedBox(height: 10), - ], - ) - : Container(), - ), - ], - ), - )); - } - out.add(const Divider()); - } - - // if (_routine!.fitInWeek) { - // out.add(Row( - // children: [ - // Expanded( - // child: Text( - // AppLocalizations.of(context).tillEndOfWeek, - // style: const TextStyle(fontWeight: FontWeight.bold), - // overflow: TextOverflow.ellipsis, - // ), - // ), - // const Icon(Icons.hotel), - // ], - // )); - // out.add(const Divider()); - // } - - return out; - } - - @override - Widget build(BuildContext context) { - final dateFormat = DateFormat.yMd(Localizations.localeOf(context).languageCode); - - return Card( - child: Column( - children: [ - ListTile( - title: Text( - _hasContent ? _routine!.name : AppLocalizations.of(context).labelWorkoutPlan, - style: Theme.of(context).textTheme.headlineSmall, - ), - subtitle: Text( - _hasContent - ? '${dateFormat.format(_routine!.start)} - ${dateFormat.format(_routine!.end)}' - : '', - ), - leading: Icon( - Icons.fitness_center, - color: Theme.of(context).textTheme.headlineSmall!.color, - ), - trailing: _hasContent - ? Tooltip( - message: AppLocalizations.of(context).toggleDetails, - child: _showDetail ? const Icon(Icons.info) : const Icon(Icons.info_outline), - ) - : const SizedBox(), - onTap: () { - setState(() { - _showDetail = !_showDetail; - }); - }, - ), - if (_hasContent) - Padding( - padding: const EdgeInsets.symmetric(horizontal: 10), - child: Column(children: [...getContent()]), - ) - else - NothingFound( - AppLocalizations.of(context).noRoutines, - AppLocalizations.of(context).newRoutine, - RoutineForm(Routine.empty()), - ), - if (_hasContent) - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - TextButton( - child: Text(AppLocalizations.of(context).goToDetailPage), - onPressed: () { - Navigator.of(context).pushNamed( - RoutineScreen.routeName, - arguments: _routine!.id, - ); - }, - ), - ], - ), - ], - ), - ); - } -} - -class NothingFound extends StatelessWidget { - final String _title; - final String _titleForm; - final Widget _form; - - const NothingFound(this._title, this._titleForm, this._form); - - @override - Widget build(BuildContext context) { - return SizedBox( - height: 150, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(_title), - IconButton( - iconSize: 30, - icon: const Icon(Icons.add_box, color: wgerPrimaryButtonColor), - onPressed: () { - Navigator.pushNamed( - context, - FormScreen.routeName, - arguments: FormScreenArguments( - _titleForm, - hasListView: true, - _form, - ), - ); - }, - ), - ], - ), - ); - } -} diff --git a/lib/widgets/dashboard/widgets/measurements.dart b/lib/widgets/dashboard/widgets/measurements.dart new file mode 100644 index 000000000..76ef69c43 --- /dev/null +++ b/lib/widgets/dashboard/widgets/measurements.dart @@ -0,0 +1,143 @@ +/* + * This file is part of wger Workout Manager . + * Copyright (C) 2020, 2021 wger Team + * + * wger Workout Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wger Workout Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import 'package:carousel_slider/carousel_slider.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; +import 'package:wger/l10n/generated/app_localizations.dart'; +import 'package:wger/providers/measurement.dart'; +import 'package:wger/screens/measurement_categories_screen.dart'; +import 'package:wger/widgets/dashboard/widgets/nothing_found.dart'; +import 'package:wger/widgets/measurements/categories_card.dart'; +import 'package:wger/widgets/measurements/forms.dart'; + +class DashboardMeasurementWidget extends StatefulWidget { + const DashboardMeasurementWidget(); + + @override + _DashboardMeasurementWidgetState createState() => _DashboardMeasurementWidgetState(); +} + +class _DashboardMeasurementWidgetState extends State { + int _current = 0; + final _controller = CarouselSliderController(); + + @override + Widget build(BuildContext context) { + final provider = Provider.of(context, listen: false); + + final items = + provider.categories.map((item) => CategoriesCard(item, elevation: 0)).toList(); + if (items.isNotEmpty) { + items.add( + NothingFound( + AppLocalizations.of(context).moreMeasurementEntries, + AppLocalizations.of(context).newEntry, + MeasurementCategoryForm(), + ), + ); + } + return Consumer( + builder: (context, _, __) => Card( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ListTile( + title: Text( + AppLocalizations.of(context).measurements, + style: Theme.of(context).textTheme.headlineSmall, + ), + leading: FaIcon( + FontAwesomeIcons.chartLine, + color: Theme.of(context).textTheme.headlineSmall!.color, + ), + // TODO: this icon feels out of place and inconsistent with all + // other dashboard widgets. + // maybe we should just add a "Go to all" at the bottom of the widget + trailing: IconButton( + icon: const Icon(Icons.arrow_forward), + onPressed: () => Navigator.pushNamed( + context, + MeasurementCategoriesScreen.routeName, + ), + ), + ), + Column( + children: [ + if (items.isNotEmpty) + Column( + children: [ + CarouselSlider( + items: items, + carouselController: _controller, + options: CarouselOptions( + autoPlay: false, + enlargeCenterPage: false, + viewportFraction: 1, + enableInfiniteScroll: false, + aspectRatio: 1.1, + onPageChanged: (index, reason) { + setState(() { + _current = index; + }); + }, + ), + ), + Padding( + padding: const EdgeInsets.only(bottom: 10), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: items.asMap().entries.map((entry) { + return GestureDetector( + onTap: () => _controller.animateToPage(entry.key), + child: Container( + width: 12.0, + height: 12.0, + margin: const EdgeInsets.symmetric( + vertical: 8.0, + horizontal: 4.0, + ), + decoration: BoxDecoration( + shape: BoxShape.circle, + color: + Theme.of(context).textTheme.headlineSmall!.color!.withOpacity( + _current == entry.key ? 0.9 : 0.4, + ), + ), + ), + ); + }).toList(), + ), + ), + ], + ) + else + NothingFound( + AppLocalizations.of(context).noMeasurementEntries, + AppLocalizations.of(context).newEntry, + MeasurementCategoryForm(), + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/dashboard/widgets/nothing_found.dart b/lib/widgets/dashboard/widgets/nothing_found.dart new file mode 100644 index 000000000..326d34175 --- /dev/null +++ b/lib/widgets/dashboard/widgets/nothing_found.dart @@ -0,0 +1,57 @@ +/* + * This file is part of wger Workout Manager . + * Copyright (C) 2020, 2021 wger Team + * + * wger Workout Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wger Workout Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import 'package:flutter/material.dart'; +import 'package:wger/screens/form_screen.dart'; +import 'package:wger/theme/theme.dart'; + +class NothingFound extends StatelessWidget { + final String _title; + final String _titleForm; + final Widget _form; + + const NothingFound(this._title, this._titleForm, this._form); + + @override + Widget build(BuildContext context) { + return SizedBox( + height: 150, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text(_title), + IconButton( + iconSize: 30, + icon: const Icon(Icons.add_box, color: wgerPrimaryButtonColor), + onPressed: () { + Navigator.pushNamed( + context, + FormScreen.routeName, + arguments: FormScreenArguments( + _titleForm, + hasListView: true, + _form, + ), + ); + }, + ), + ], + ), + ); + } +} diff --git a/lib/widgets/dashboard/widgets/nutrition.dart b/lib/widgets/dashboard/widgets/nutrition.dart new file mode 100644 index 000000000..ceb4d8bf7 --- /dev/null +++ b/lib/widgets/dashboard/widgets/nutrition.dart @@ -0,0 +1,132 @@ +/* + * This file is part of wger Workout Manager . + * Copyright (C) 2020, 2021 wger Team + * + * wger Workout Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wger Workout Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import 'package:flutter/material.dart'; +import 'package:flutter_svg_icons/flutter_svg_icons.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; +import 'package:wger/l10n/generated/app_localizations.dart'; +import 'package:wger/models/nutrition/nutritional_plan.dart'; +import 'package:wger/providers/nutrition.dart'; +import 'package:wger/screens/form_screen.dart'; +import 'package:wger/screens/log_meals_screen.dart'; +import 'package:wger/screens/nutritional_plan_screen.dart'; +import 'package:wger/widgets/dashboard/widgets/nothing_found.dart'; +import 'package:wger/widgets/nutrition/charts.dart'; +import 'package:wger/widgets/nutrition/forms.dart'; + +class DashboardNutritionWidget extends StatefulWidget { + const DashboardNutritionWidget(); + + @override + _DashboardNutritionWidgetState createState() => _DashboardNutritionWidgetState(); +} + +class _DashboardNutritionWidgetState extends State { + NutritionalPlan? _plan; + bool _hasContent = false; + + @override + void initState() { + super.initState(); + _plan = Provider.of(context, listen: false).currentPlan; + _hasContent = _plan != null; + } + + @override + Widget build(BuildContext context) { + return Card( + child: Column( + children: [ + ListTile( + title: Text( + _hasContent ? _plan!.description : AppLocalizations.of(context).nutritionalPlan, + style: Theme.of(context).textTheme.headlineSmall, + ), + subtitle: Text( + _hasContent + ? DateFormat.yMd(Localizations.localeOf(context).languageCode) + .format(_plan!.creationDate) + : '', + ), + leading: Icon( + Icons.restaurant, + color: Theme.of(context).textTheme.headlineSmall!.color, + ), + ), + if (_hasContent) + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 15), + child: FlNutritionalPlanGoalWidget(nutritionalPlan: _plan!), + ), + ) + else + NothingFound( + AppLocalizations.of(context).noNutritionalPlans, + AppLocalizations.of(context).newNutritionalPlan, + PlanForm(), + ), + if (_hasContent) + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + TextButton( + child: Text(AppLocalizations.of(context).goToDetailPage), + onPressed: () { + Navigator.of(context).pushNamed( + NutritionalPlanScreen.routeName, + arguments: _plan, + ); + }, + ), + Expanded(child: Container()), + IconButton( + icon: const SvgIcon( + icon: SvgIconData('assets/icons/ingredient-diary.svg'), + ), + tooltip: AppLocalizations.of(context).logIngredient, + onPressed: () { + Navigator.pushNamed( + context, + FormScreen.routeName, + arguments: FormScreenArguments( + AppLocalizations.of(context).logIngredient, + IngredientLogForm(_plan!), + hasListView: true, + ), + ); + }, + ), + IconButton( + icon: const SvgIcon( + icon: SvgIconData('assets/icons/meal-diary.svg'), + ), + tooltip: AppLocalizations.of(context).logMeal, + onPressed: () { + Navigator.of(context).pushNamed(LogMealsScreen.routeName, arguments: _plan); + }, + ), + ], + ), + ], + ), + ); + } +} diff --git a/lib/widgets/dashboard/widgets/routines.dart b/lib/widgets/dashboard/widgets/routines.dart new file mode 100644 index 000000000..dd34773c2 --- /dev/null +++ b/lib/widgets/dashboard/widgets/routines.dart @@ -0,0 +1,205 @@ +/* + * This file is part of wger Workout Manager . + * Copyright (C) 2020, 2021 wger Team + * + * wger Workout Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wger Workout Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; +import 'package:wger/helpers/misc.dart'; +import 'package:wger/l10n/generated/app_localizations.dart'; +import 'package:wger/models/workouts/day_data.dart'; +import 'package:wger/models/workouts/routine.dart'; +import 'package:wger/providers/routines.dart'; +import 'package:wger/screens/gym_mode.dart'; +import 'package:wger/screens/routine_screen.dart'; +import 'package:wger/theme/theme.dart'; +import 'package:wger/widgets/core/core.dart'; +import 'package:wger/widgets/dashboard/widgets/nothing_found.dart'; +import 'package:wger/widgets/routines/forms/routine.dart'; + +class DashboardRoutineWidget extends StatefulWidget { + const DashboardRoutineWidget(); + + @override + _DashboardRoutineWidgetState createState() => _DashboardRoutineWidgetState(); +} + +class _DashboardRoutineWidgetState extends State { + var _showDetail = false; + bool _hasContent = false; + + @override + Widget build(BuildContext context) { + final routine = context.watch().activeRoutine; + _hasContent = routine != null; + final dateFormat = DateFormat.yMd(Localizations.localeOf(context).languageCode); + + return Card( + child: Column( + children: [ + ListTile( + title: Text( + _hasContent ? routine!.name : AppLocalizations.of(context).labelWorkoutPlan, + style: Theme.of(context).textTheme.headlineSmall, + ), + subtitle: Text( + _hasContent + ? '${dateFormat.format(routine!.start)} - ${dateFormat.format(routine!.end)}' + : '', + ), + leading: Icon( + Icons.fitness_center, + color: Theme.of(context).textTheme.headlineSmall!.color, + ), + trailing: _hasContent + ? Tooltip( + message: AppLocalizations.of(context).toggleDetails, + child: _showDetail ? const Icon(Icons.info) : const Icon(Icons.info_outline), + ) + : const SizedBox(), + onTap: () { + setState(() { + _showDetail = !_showDetail; + }); + }, + ), + if (_hasContent) ...[ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: DetailContentWidget(routine!.dayDataCurrentIteration, _showDetail), + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + TextButton( + child: Text(AppLocalizations.of(context).goToDetailPage), + onPressed: () { + Navigator.of(context).pushNamed( + RoutineScreen.routeName, + arguments: routine.id, + ); + }, + ), + ], + ), + ] else + NothingFound( + AppLocalizations.of(context).noRoutines, + AppLocalizations.of(context).newRoutine, + RoutineForm(Routine.empty()), + ), + ], + ), + ); + } +} + +class DetailContentWidget extends StatelessWidget { + final List dayDataList; + final bool showDetail; + + const DetailContentWidget(this.dayDataList, this.showDetail, {super.key}); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + ...dayDataList.where((dayData) => dayData.day != null).map((dayData) { + return Column( + children: [ + SizedBox( + width: double.infinity, + child: Row( + children: [ + if (dayData.date.isSameDayAs(DateTime.now())) const Icon(Icons.today), + Expanded( + child: Text( + dayData.day == null || dayData.day!.isRest + ? AppLocalizations.of(context).restDay + : dayData.day!.name, + style: const TextStyle(fontWeight: FontWeight.bold), + overflow: TextOverflow.ellipsis, + ), + ), + Expanded( + child: MutedText( + dayData.day != null ? dayData.day!.description : '', + textAlign: TextAlign.right, + overflow: TextOverflow.ellipsis, + ), + ), + if (dayData.day == null || dayData.day!.isRest) + const Icon(Icons.hotel) + else + IconButton( + icon: const Icon(Icons.play_arrow), + color: wgerPrimaryButtonColor, + onPressed: () { + Navigator.of(context).pushNamed( + GymModeScreen.routeName, + arguments: GymModeArguments( + dayData.day!.routineId, + dayData.day!.id!, + dayData.iteration, + ), + ); + }, + ), + ], + ), + ), + ...dayData.slots.map( + (slotData) => SizedBox( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...slotData.setConfigs.map( + (s) => showDetail + ? Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(s.exercise + .getTranslation( + Localizations.localeOf(context).languageCode) + .name), + const SizedBox(width: 10), + Expanded( + child: + MutedText(s.textRepr, overflow: TextOverflow.ellipsis), + ), + ], + ), + const SizedBox(height: 10), + ], + ) + : Container(), + ), + ], + ), + ), + ), + const Divider(), + ], + ); + }), + ], + ); + } +} diff --git a/lib/widgets/dashboard/widgets/weight.dart b/lib/widgets/dashboard/widgets/weight.dart new file mode 100644 index 000000000..c5652cbf8 --- /dev/null +++ b/lib/widgets/dashboard/widgets/weight.dart @@ -0,0 +1,121 @@ +/* + * This file is part of wger Workout Manager . + * Copyright (C) 2020, 2021 wger Team + * + * wger Workout Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wger Workout Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; +import 'package:wger/l10n/generated/app_localizations.dart'; +import 'package:wger/providers/body_weight.dart'; +import 'package:wger/providers/user.dart'; +import 'package:wger/screens/form_screen.dart'; +import 'package:wger/screens/weight_screen.dart'; +import 'package:wger/widgets/dashboard/widgets/nothing_found.dart'; +import 'package:wger/widgets/measurements/charts.dart'; +import 'package:wger/widgets/measurements/helpers.dart'; +import 'package:wger/widgets/weight/forms.dart'; + +class DashboardWeightWidget extends StatelessWidget { + const DashboardWeightWidget(); + + @override + Widget build(BuildContext context) { + final profile = context.read().profile; + final weightProvider = context.read(); + + final (entriesAll, entries7dAvg) = sensibleRange( + weightProvider.items.map((e) => MeasurementChartEntry(e.weight, e.date)).toList(), + ); + + return Consumer( + builder: (context, _, __) => Card( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ListTile( + title: Text( + AppLocalizations.of(context).weight, + style: Theme.of(context).textTheme.headlineSmall, + ), + leading: FaIcon( + FontAwesomeIcons.weightScale, + color: Theme.of(context).textTheme.headlineSmall!.color, + ), + ), + Column( + children: [ + if (weightProvider.items.isNotEmpty) + Column( + children: [ + SizedBox( + height: 200, + child: MeasurementChartWidgetFl( + entriesAll, + weightUnit(profile!.isMetric, context), + avgs: entries7dAvg, + ), + ), + if (entries7dAvg.isNotEmpty) + MeasurementOverallChangeWidget( + entries7dAvg.first, + entries7dAvg.last, + weightUnit(profile.isMetric, context), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + TextButton( + child: Text( + AppLocalizations.of(context).goToDetailPage, + ), + onPressed: () { + Navigator.of(context).pushNamed(WeightScreen.routeName); + }, + ), + IconButton( + icon: const Icon(Icons.add), + onPressed: () { + Navigator.pushNamed( + context, + FormScreen.routeName, + arguments: FormScreenArguments( + AppLocalizations.of(context).newEntry, + WeightForm(weightProvider + .getNewestEntry() + ?.copyWith(id: null, date: DateTime.now())), + ), + ); + }, + ), + ], + ), + ], + ) + else + NothingFound( + AppLocalizations.of(context).noWeightEntries, + AppLocalizations.of(context).newEntry, + WeightForm(), + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/routines/routines_list.dart b/lib/widgets/routines/routines_list.dart index de42ae676..2932e2851 100644 --- a/lib/widgets/routines/routines_list.dart +++ b/lib/widgets/routines/routines_list.dart @@ -41,7 +41,7 @@ class _RoutinesListState extends State { final dateFormat = DateFormat.yMd(Localizations.localeOf(context).languageCode); return RefreshIndicator( - onRefresh: () => widget._routineProvider.fetchAndSetAllPlansSparse(), + onRefresh: () => widget._routineProvider.fetchAndSetAllRoutinesSparse(), child: widget._routineProvider.items.isEmpty ? const TextPrompt() : ListView.builder( @@ -53,7 +53,7 @@ class _RoutinesListState extends State { return Card( child: ListTile( onTap: () async { - widget._routineProvider.setCurrentPlan(currentRoutine.id!); + widget._routineProvider.activeRoutine = currentRoutine; setState(() { _loadingRoutine = currentRoutine.id; diff --git a/test/auth/auth_screen_test.mocks.dart b/test/auth/auth_screen_test.mocks.dart index 32b76b472..f0c573d1a 100644 --- a/test/auth/auth_screen_test.mocks.dart +++ b/test/auth/auth_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/auth/auth_screen_test.dart. // Do not manually edit this file. @@ -26,12 +26,23 @@ import 'package:mockito/src/dummies.dart' as _i5; // ignore_for_file: subtype_of_sealed_class 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]. @@ -43,25 +54,45 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _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}), - ), + _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>); @override - _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}), - ), + _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>); @override @@ -75,18 +106,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #post, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -100,18 +137,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #put, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -125,18 +168,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #patch, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -150,29 +199,45 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #delete, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #headers: headers, + #body: body, + #encoding: encoding, + }, ), - returnValue: _i3.Future<_i2.Response>.value( - _FakeResponse_0( - this, - 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}) => (super.noSuchMethod( - Invocation.method(#read, [url], {#headers: headers}), - returnValue: _i3.Future.value( - _i5.dummyValue( - this, - Invocation.method(#read, [url], {#headers: 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); @override @@ -181,24 +246,35 @@ class MockClient extends _i1.Mock implements _i2.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method(#readBytes, [url], {#headers: headers}), + Invocation.method( + #readBytes, + [url], + {#headers: headers}, + ), returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), ) as _i3.Future<_i6.Uint8List>); @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]), - ), + 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, []), + Invocation.method( + #close, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/core/settings_test.mocks.dart b/test/core/settings_test.mocks.dart index 540cabb87..89f769385 100644 --- a/test/core/settings_test.mocks.dart +++ b/test/core/settings_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/core/settings_test.dart. // Do not manually edit this file. @@ -44,78 +44,173 @@ import 'package:wger/providers/user.dart' as _i22; // ignore_for_file: subtype_of_sealed_class 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]. @@ -144,36 +239,18 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { ), ) as _i3.ExerciseDatabase); - @override - set database(_i3.ExerciseDatabase? _database) => super.noSuchMethod( - Invocation.setter(#database, _database), - returnValueForMissingStub: null, - ); - @override List<_i4.Exercise> get exercises => (super.noSuchMethod( Invocation.getter(#exercises), returnValue: <_i4.Exercise>[], ) as List<_i4.Exercise>); - @override - set exercises(List<_i4.Exercise>? _exercises) => super.noSuchMethod( - Invocation.setter(#exercises, _exercises), - returnValueForMissingStub: null, - ); - @override List<_i4.Exercise> get filteredExercises => (super.noSuchMethod( Invocation.getter(#filteredExercises), returnValue: <_i4.Exercise>[], ) as List<_i4.Exercise>); - @override - set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter(#filteredExercises, newFilteredExercises), - returnValueForMissingStub: null, - ); - @override Map> get exerciseByVariation => (super.noSuchMethod( Invocation.getter(#exerciseByVariation), @@ -205,47 +282,97 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { ) as List<_i8.Language>); @override - set languages(List<_i8.Language>? languages) => super.noSuchMethod( - Invocation.setter(#languages, languages), + set database(_i3.ExerciseDatabase? _database) => super.noSuchMethod( + Invocation.setter( + #database, + _database, + ), returnValueForMissingStub: null, ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set exercises(List<_i4.Exercise>? _exercises) => super.noSuchMethod( + Invocation.setter( + #exercises, + _exercises, + ), + returnValueForMissingStub: null, + ); + + @override + set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( + Invocation.setter( + #filteredExercises, + newFilteredExercises, + ), + returnValueForMissingStub: null, + ); + + @override + 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); @override _i18.Future setFilters(_i17.Filters? newFilters) => (super.noSuchMethod( - Invocation.method(#setFilters, [newFilters]), + Invocation.method( + #setFilters, + [newFilters], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override void initFilters() => super.noSuchMethod( - Invocation.method(#initFilters, []), + Invocation.method( + #initFilters, + [], + ), returnValueForMissingStub: null, ); @override _i18.Future findByFilters() => (super.noSuchMethod( - Invocation.method(#findByFilters, []), + Invocation.method( + #findByFilters, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i4.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method(#findExerciseById, [id]), + Invocation.method( + #findExerciseById, + [id], + ), returnValue: _FakeExercise_2( this, - Invocation.method(#findExerciseById, [id]), + Invocation.method( + #findExerciseById, + [id], + ), ), ) as _i4.Exercise); @@ -265,71 +392,110 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { @override _i5.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), returnValue: _FakeExerciseCategory_3( this, - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), ), ) as _i5.ExerciseCategory); @override _i6.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method(#findEquipmentById, [id]), + Invocation.method( + #findEquipmentById, + [id], + ), returnValue: _FakeEquipment_4( this, - Invocation.method(#findEquipmentById, [id]), + Invocation.method( + #findEquipmentById, + [id], + ), ), ) as _i6.Equipment); @override _i7.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method(#findMuscleById, [id]), + Invocation.method( + #findMuscleById, + [id], + ), returnValue: _FakeMuscle_5( this, - Invocation.method(#findMuscleById, [id]), + Invocation.method( + #findMuscleById, + [id], + ), ), ) as _i7.Muscle); @override _i8.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method(#findLanguageById, [id]), + Invocation.method( + #findLanguageById, + [id], + ), returnValue: _FakeLanguage_6( this, - Invocation.method(#findLanguageById, [id]), + Invocation.method( + #findLanguageById, + [id], + ), ), ) as _i8.Language); @override _i18.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetCategoriesFromApi, []), + Invocation.method( + #fetchAndSetCategoriesFromApi, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override _i18.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetMusclesFromApi, []), + Invocation.method( + #fetchAndSetMusclesFromApi, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override _i18.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetEquipmentsFromApi, []), + Invocation.method( + #fetchAndSetEquipmentsFromApi, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override _i18.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetLanguagesFromApi, []), + Invocation.method( + #fetchAndSetLanguagesFromApi, + [], + ), 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]), + Invocation.method( + #fetchAndSetExercise, + [exerciseId], + ), returnValue: _i18.Future<_i4.Exercise?>.value(), ) as _i18.Future<_i4.Exercise?>); @@ -339,40 +505,52 @@ 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, [ + 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, - }), + 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, []), + Invocation.method( + #clearAllCachesAndPrefs, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override _i18.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method(#fetchAndSetInitialData, []), + Invocation.method( + #fetchAndSetInitialData, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @@ -394,35 +572,50 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { @override _i18.Future updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method(#updateExerciseCache, [database]), + 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]), + 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]), + 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]), + 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]), + Invocation.method( + #fetchAndSetEquipments, + [database], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @@ -437,34 +630,47 @@ class MockExercisesProvider extends _i1.Mock implements _i17.ExercisesProvider { Invocation.method( #searchExercise, [name], - {#languageCode: languageCode, #searchEnglish: searchEnglish}, - ), - returnValue: _i18.Future>.value( - <_i4.Exercise>[], + { + #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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } @@ -495,24 +701,12 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans ), ) as _i9.IngredientDatabase); - @override - set database(_i9.IngredientDatabase? _database) => super.noSuchMethod( - Invocation.setter(#database, _database), - returnValueForMissingStub: null, - ); - @override List<_i13.Ingredient> get ingredients => (super.noSuchMethod( Invocation.getter(#ingredients), returnValue: <_i13.Ingredient>[], ) as List<_i13.Ingredient>); - @override - set ingredients(List<_i13.Ingredient>? _ingredients) => super.noSuchMethod( - Invocation.setter(#ingredients, _ingredients), - returnValueForMissingStub: null, - ); - @override List<_i10.NutritionalPlan> get items => (super.noSuchMethod( Invocation.getter(#items), @@ -520,108 +714,190 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans ) as List<_i10.NutritionalPlan>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set database(_i9.IngredientDatabase? _database) => super.noSuchMethod( + Invocation.setter( + #database, + _database, + ), + returnValueForMissingStub: null, + ); + + @override + set ingredients(List<_i13.Ingredient>? _ingredients) => super.noSuchMethod( + Invocation.setter( + #ingredients, + _ingredients, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i10.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeNutritionalPlan_8( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i10.NutritionalPlan); @override - _i11.Meal? findMealById(int? id) => - (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i11.Meal?); + _i11.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( + #findMealById, + [id], + )) as _i11.Meal?); @override _i18.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + Invocation.method( + #fetchAndSetAllPlansSparse, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override _i18.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansFull, []), + 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]), - ), + 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]), - ), + 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]), - ), + 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]), + 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]), + 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])), + _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])), + 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]), + Invocation.method( + #deleteMeal, + [meal], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @@ -632,25 +908,41 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans _i11.Meal? meal, ) => (super.noSuchMethod( - Invocation.method(#addMealItem, [mealItem, meal]), - returnValue: _i18.Future<_i12.MealItem>.value( - _FakeMealItem_10( - this, - Invocation.method(#addMealItem, [mealItem, meal]), - ), + 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]), + Invocation.method( + #deleteMealItem, + [mealItem], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override _i18.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method(#clearIngredientCache, []), + Invocation.method( + #clearIngredientCache, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @@ -666,21 +958,22 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans [ingredientId], {#database: database}, ), - returnValue: _i18.Future<_i13.Ingredient>.value( - _FakeIngredient_11( - this, - 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, []), + Invocation.method( + #fetchIngredientsFromCache, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @@ -695,22 +988,30 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans Invocation.method( #searchIngredient, [name], - {#languageCode: languageCode, #searchEnglish: searchEnglish}, + { + #languageCode: languageCode, + #searchEnglish: searchEnglish, + }, ), returnValue: _i18.Future>.value( - <_i21.IngredientApiSearchEntry>[], - ), + <_i21.IngredientApiSearchEntry>[]), ) as _i18.Future>); @override _i18.Future<_i13.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( - Invocation.method(#searchIngredientWithCode, [code]), + Invocation.method( + #searchIngredientWithCode, + [code], + ), returnValue: _i18.Future<_i13.Ingredient?>.value(), ) as _i18.Future<_i13.Ingredient?>); @override _i18.Future logMealToDiary(_i11.Meal? meal) => (super.noSuchMethod( - Invocation.method(#logMealToDiary, [meal]), + Invocation.method( + #logMealToDiary, + [meal], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @@ -722,50 +1023,78 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i20.NutritionPlans DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method(#logIngredientToDiary, [ - mealItem, - planId, - dateTime, - ]), + 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) => (super.noSuchMethod( - Invocation.method(#deleteLog, [logId, 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); @override _i18.Future fetchAndSetLogs(_i10.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method(#fetchAndSetLogs, [plan]), + 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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } @@ -784,12 +1113,6 @@ class MockUserProvider extends _i1.Mock implements _i22.UserProvider { returnValue: _i23.ThemeMode.system, ) as _i23.ThemeMode); - @override - set themeMode(_i23.ThemeMode? _themeMode) => super.noSuchMethod( - Invocation.setter(#themeMode, _themeMode), - returnValueForMissingStub: null, - ); - @override _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( Invocation.getter(#baseProvider), @@ -808,76 +1131,120 @@ class MockUserProvider extends _i1.Mock implements _i22.UserProvider { ), ) as _i14.SharedPreferencesAsync); + @override + set themeMode(_i23.ThemeMode? _themeMode) => super.noSuchMethod( + Invocation.setter( + #themeMode, + _themeMode, + ), + returnValueForMissingStub: null, + ); + @override set prefs(_i14.SharedPreferencesAsync? _prefs) => super.noSuchMethod( - Invocation.setter(#prefs, _prefs), + Invocation.setter( + #prefs, + _prefs, + ), returnValueForMissingStub: null, ); @override set profile(_i24.Profile? _profile) => super.noSuchMethod( - Invocation.setter(#profile, _profile), + Invocation.setter( + #profile, + _profile, + ), 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, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override void setThemeMode(_i23.ThemeMode? mode) => super.noSuchMethod( - Invocation.method(#setThemeMode, [mode]), + Invocation.method( + #setThemeMode, + [mode], + ), returnValueForMissingStub: null, ); @override _i18.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method(#fetchAndSetProfile, []), + Invocation.method( + #fetchAndSetProfile, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override _i18.Future saveProfile() => (super.noSuchMethod( - Invocation.method(#saveProfile, []), + Invocation.method( + #saveProfile, + [], + ), returnValue: _i18.Future.value(), returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override _i18.Future verifyEmail() => (super.noSuchMethod( - Invocation.method(#verifyEmail, []), + 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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i19.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } @@ -893,32 +1260,46 @@ 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)), + returnValue: _FakeAuthProvider_13( + this, + Invocation.getter(#auth), + ), ) as _i15.AuthProvider); - @override - set auth(_i15.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i16.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_14(this, Invocation.getter(#client)), + returnValue: _FakeClient_14( + this, + Invocation.getter(#client), + ), ) as _i16.Client); + @override + set auth(_i15.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i16.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -933,27 +1314,41 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_15( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i18.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i18.Future.value(), ) as _i18.Future); @override _i18.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i18.Future>.value([]), ) as _i18.Future>); @@ -963,10 +1358,14 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i18.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i18.Future>.value({}), ) as _i18.Future>); @override @@ -975,21 +1374,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i2.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i18.Future>.value( - {}, + 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]), - ), + _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>); } @@ -1004,99 +1421,180 @@ class MockSharedPreferencesAsync extends _i1.Mock implements _i14.SharedPreferen @override _i18.Future> getKeys({Set? allowList}) => (super.noSuchMethod( - Invocation.method(#getKeys, [], {#allowList: allowList}), + 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( - {}, + Invocation.method( + #getAll, + [], + {#allowList: allowList}, ), + returnValue: _i18.Future>.value({}), ) as _i18.Future>); @override _i18.Future getBool(String? key) => (super.noSuchMethod( - Invocation.method(#getBool, [key]), + Invocation.method( + #getBool, + [key], + ), returnValue: _i18.Future.value(), ) as _i18.Future); @override _i18.Future getInt(String? key) => (super.noSuchMethod( - Invocation.method(#getInt, [key]), + Invocation.method( + #getInt, + [key], + ), returnValue: _i18.Future.value(), ) as _i18.Future); @override _i18.Future getDouble(String? key) => (super.noSuchMethod( - Invocation.method(#getDouble, [key]), + Invocation.method( + #getDouble, + [key], + ), returnValue: _i18.Future.value(), ) as _i18.Future); @override _i18.Future getString(String? key) => (super.noSuchMethod( - Invocation.method(#getString, [key]), + Invocation.method( + #getString, + [key], + ), returnValue: _i18.Future.value(), ) as _i18.Future); @override _i18.Future?> getStringList(String? key) => (super.noSuchMethod( - Invocation.method(#getStringList, [key]), + Invocation.method( + #getStringList, + [key], + ), returnValue: _i18.Future?>.value(), ) as _i18.Future?>); @override _i18.Future containsKey(String? key) => (super.noSuchMethod( - Invocation.method(#containsKey, [key]), + 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]), + _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]), + _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]), + _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]), + _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]), + _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]), + 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}), + 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 6131aa6b3..a3fd5dd56 100644 --- a/test/exercises/contribute_exercise_test.mocks.dart +++ b/test/exercises/contribute_exercise_test.mocks.dart @@ -1,21 +1,21 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/exercises/contribute_exercise_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i14; -import 'dart:io' as _i11; +import 'dart:io' as _i9; import 'dart:ui' as _i15; import 'package:flutter/material.dart' as _i17; import 'package:mockito/mockito.dart' as _i1; import 'package:shared_preferences/shared_preferences.dart' as _i7; import 'package:wger/models/exercises/alias.dart' as _i6; -import 'package:wger/models/exercises/category.dart' as _i10; -import 'package:wger/models/exercises/equipment.dart' as _i12; +import 'package:wger/models/exercises/category.dart' as _i13; +import 'package:wger/models/exercises/equipment.dart' as _i10; import 'package:wger/models/exercises/exercise.dart' as _i3; -import 'package:wger/models/exercises/language.dart' as _i9; -import 'package:wger/models/exercises/muscle.dart' as _i13; +import 'package:wger/models/exercises/language.dart' as _i12; +import 'package:wger/models/exercises/muscle.dart' as _i11; import 'package:wger/models/exercises/translation.dart' as _i4; import 'package:wger/models/exercises/variation.dart' as _i5; import 'package:wger/models/user/profile.dart' as _i18; @@ -38,29 +38,63 @@ import 'package:wger/providers/user.dart' as _i16; // ignore_for_file: subtype_of_sealed_class 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 _FakeExercise_1 extends _i1.SmartFake implements _i3.Exercise { - _FakeExercise_1(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); + _FakeExercise_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeTranslation_2 extends _i1.SmartFake implements _i4.Translation { - _FakeTranslation_2(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); + _FakeTranslation_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeVariation_3 extends _i1.SmartFake implements _i5.Variation { - _FakeVariation_3(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); + _FakeVariation_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeAlias_4 extends _i1.SmartFake implements _i6.Alias { - _FakeAlias_4(Object parent, Invocation parentInvocation) : super(parent, parentInvocation); + _FakeAlias_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeSharedPreferencesAsync_5 extends _i1.SmartFake implements _i7.SharedPreferencesAsync { - _FakeSharedPreferencesAsync_5(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeSharedPreferencesAsync_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [AddExerciseProvider]. @@ -81,91 +115,30 @@ class MockAddExerciseProvider extends _i1.Mock implements _i8.AddExerciseProvide ) as _i2.WgerBaseProvider); @override - set language(_i9.Language? _language) => super.noSuchMethod( - Invocation.setter(#language, _language), - returnValueForMissingStub: null, - ); - - @override - set category(_i10.ExerciseCategory? _category) => super.noSuchMethod( - Invocation.setter(#category, _category), - returnValueForMissingStub: null, - ); - - @override - List<_i11.File> get exerciseImages => (super.noSuchMethod( + List<_i9.File> get exerciseImages => (super.noSuchMethod( Invocation.getter(#exerciseImages), - returnValue: <_i11.File>[], - ) as List<_i11.File>); + returnValue: <_i9.File>[], + ) as List<_i9.File>); @override - set exerciseNameEn(String? name) => super.noSuchMethod( - Invocation.setter(#exerciseNameEn, name), - returnValueForMissingStub: null, - ); - - @override - set exerciseNameTrans(String? name) => super.noSuchMethod( - Invocation.setter(#exerciseNameTrans, name), - returnValueForMissingStub: null, - ); - - @override - set descriptionEn(String? description) => super.noSuchMethod( - Invocation.setter(#descriptionEn, description), - returnValueForMissingStub: null, - ); - - @override - set descriptionTrans(String? description) => super.noSuchMethod( - Invocation.setter(#descriptionTrans, description), - returnValueForMissingStub: null, - ); - - @override - set alternateNamesEn(List? names) => super.noSuchMethod( - Invocation.setter(#alternateNamesEn, names), - returnValueForMissingStub: null, - ); - - @override - set alternateNamesTrans(List? names) => super.noSuchMethod( - Invocation.setter(#alternateNamesTrans, names), - returnValueForMissingStub: null, - ); - - @override - set equipment(List<_i12.Equipment>? equipment) => super.noSuchMethod( - Invocation.setter(#equipment, equipment), - returnValueForMissingStub: null, - ); - - @override - List<_i12.Equipment> get equipment => (super.noSuchMethod( + List<_i10.Equipment> get equipment => (super.noSuchMethod( Invocation.getter(#equipment), - returnValue: <_i12.Equipment>[], - ) as List<_i12.Equipment>); + returnValue: <_i10.Equipment>[], + ) as List<_i10.Equipment>); @override - bool get newVariation => - (super.noSuchMethod(Invocation.getter(#newVariation), returnValue: false) as bool); - - @override - set newVariationForExercise(int? value) => super.noSuchMethod( - Invocation.setter(#newVariationForExercise, value), - returnValueForMissingStub: null, - ); - - @override - set variationId(int? variation) => super.noSuchMethod( - Invocation.setter(#variationId, variation), - returnValueForMissingStub: null, - ); + bool get newVariation => (super.noSuchMethod( + Invocation.getter(#newVariation), + returnValue: false, + ) as bool); @override _i3.Exercise get exercise => (super.noSuchMethod( Invocation.getter(#exercise), - returnValue: _FakeExercise_1(this, Invocation.getter(#exercise)), + returnValue: _FakeExercise_1( + this, + Invocation.getter(#exercise), + ), ) as _i3.Exercise); @override @@ -189,136 +162,306 @@ class MockAddExerciseProvider extends _i1.Mock implements _i8.AddExerciseProvide @override _i5.Variation get variation => (super.noSuchMethod( Invocation.getter(#variation), - returnValue: _FakeVariation_3(this, Invocation.getter(#variation)), + returnValue: _FakeVariation_3( + this, + Invocation.getter(#variation), + ), ) as _i5.Variation); @override - List<_i13.Muscle> get primaryMuscles => (super.noSuchMethod( + List<_i11.Muscle> get primaryMuscles => (super.noSuchMethod( Invocation.getter(#primaryMuscles), - returnValue: <_i13.Muscle>[], - ) as List<_i13.Muscle>); + returnValue: <_i11.Muscle>[], + ) as List<_i11.Muscle>); @override - set primaryMuscles(List<_i13.Muscle>? muscles) => super.noSuchMethod( - Invocation.setter(#primaryMuscles, muscles), - returnValueForMissingStub: null, - ); - - @override - List<_i13.Muscle> get secondaryMuscles => (super.noSuchMethod( + List<_i11.Muscle> get secondaryMuscles => (super.noSuchMethod( Invocation.getter(#secondaryMuscles), - returnValue: <_i13.Muscle>[], - ) as List<_i13.Muscle>); + returnValue: <_i11.Muscle>[], + ) as List<_i11.Muscle>); @override - set secondaryMuscles(List<_i13.Muscle>? muscles) => super.noSuchMethod( - Invocation.setter(#secondaryMuscles, muscles), + set language(_i12.Language? _language) => super.noSuchMethod( + Invocation.setter( + #language, + _language, + ), returnValueForMissingStub: null, ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set category(_i13.ExerciseCategory? _category) => super.noSuchMethod( + Invocation.setter( + #category, + _category, + ), + returnValueForMissingStub: null, + ); + + @override + set exerciseNameEn(String? name) => super.noSuchMethod( + Invocation.setter( + #exerciseNameEn, + name, + ), + returnValueForMissingStub: null, + ); + + @override + set exerciseNameTrans(String? name) => super.noSuchMethod( + Invocation.setter( + #exerciseNameTrans, + name, + ), + returnValueForMissingStub: null, + ); + + @override + set descriptionEn(String? description) => super.noSuchMethod( + Invocation.setter( + #descriptionEn, + description, + ), + returnValueForMissingStub: null, + ); + + @override + set descriptionTrans(String? description) => super.noSuchMethod( + Invocation.setter( + #descriptionTrans, + description, + ), + returnValueForMissingStub: null, + ); + + @override + set alternateNamesEn(List? names) => super.noSuchMethod( + Invocation.setter( + #alternateNamesEn, + names, + ), + returnValueForMissingStub: null, + ); + + @override + set alternateNamesTrans(List? names) => super.noSuchMethod( + Invocation.setter( + #alternateNamesTrans, + names, + ), + returnValueForMissingStub: null, + ); + + @override + set equipment(List<_i10.Equipment>? equipment) => super.noSuchMethod( + Invocation.setter( + #equipment, + equipment, + ), + returnValueForMissingStub: null, + ); + + @override + set newVariationForExercise(int? value) => super.noSuchMethod( + Invocation.setter( + #newVariationForExercise, + value, + ), + returnValueForMissingStub: null, + ); + + @override + set variationId(int? variation) => super.noSuchMethod( + Invocation.setter( + #variationId, + variation, + ), + returnValueForMissingStub: null, + ); + + @override + set primaryMuscles(List<_i11.Muscle>? muscles) => super.noSuchMethod( + Invocation.setter( + #primaryMuscles, + muscles, + ), + returnValueForMissingStub: null, + ); + + @override + set secondaryMuscles(List<_i11.Muscle>? muscles) => super.noSuchMethod( + Invocation.setter( + #secondaryMuscles, + muscles, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override - void addExerciseImages(List<_i11.File>? exercises) => super.noSuchMethod( - Invocation.method(#addExerciseImages, [exercises]), + void addExerciseImages(List<_i9.File>? exercises) => super.noSuchMethod( + Invocation.method( + #addExerciseImages, + [exercises], + ), returnValueForMissingStub: null, ); @override void removeExercise(String? path) => super.noSuchMethod( - Invocation.method(#removeExercise, [path]), + Invocation.method( + #removeExercise, + [path], + ), returnValueForMissingStub: null, ); @override void printValues() => super.noSuchMethod( - Invocation.method(#printValues, []), + Invocation.method( + #printValues, + [], + ), returnValueForMissingStub: null, ); @override _i14.Future addExercise() => (super.noSuchMethod( - Invocation.method(#addExercise, []), + Invocation.method( + #addExercise, + [], + ), returnValue: _i14.Future.value(0), ) as _i14.Future); @override _i14.Future<_i3.Exercise> addExerciseBase() => (super.noSuchMethod( - Invocation.method(#addExerciseBase, []), - returnValue: _i14.Future<_i3.Exercise>.value( - _FakeExercise_1(this, Invocation.method(#addExerciseBase, [])), + Invocation.method( + #addExerciseBase, + [], ), + returnValue: _i14.Future<_i3.Exercise>.value(_FakeExercise_1( + this, + Invocation.method( + #addExerciseBase, + [], + ), + )), ) as _i14.Future<_i3.Exercise>); @override _i14.Future<_i5.Variation> addVariation() => (super.noSuchMethod( - Invocation.method(#addVariation, []), - returnValue: _i14.Future<_i5.Variation>.value( - _FakeVariation_3(this, Invocation.method(#addVariation, [])), + Invocation.method( + #addVariation, + [], ), + returnValue: _i14.Future<_i5.Variation>.value(_FakeVariation_3( + this, + Invocation.method( + #addVariation, + [], + ), + )), ) as _i14.Future<_i5.Variation>); @override _i14.Future addImages(_i3.Exercise? exercise) => (super.noSuchMethod( - Invocation.method(#addImages, [exercise]), + Invocation.method( + #addImages, + [exercise], + ), returnValue: _i14.Future.value(), returnValueForMissingStub: _i14.Future.value(), ) as _i14.Future); @override - _i14.Future<_i4.Translation> addExerciseTranslation( - _i4.Translation? exercise, - ) => + _i14.Future<_i4.Translation> addExerciseTranslation(_i4.Translation? exercise) => (super.noSuchMethod( - Invocation.method(#addExerciseTranslation, [exercise]), - returnValue: _i14.Future<_i4.Translation>.value( - _FakeTranslation_2( - this, - Invocation.method(#addExerciseTranslation, [exercise]), - ), + Invocation.method( + #addExerciseTranslation, + [exercise], ), + returnValue: _i14.Future<_i4.Translation>.value(_FakeTranslation_2( + this, + Invocation.method( + #addExerciseTranslation, + [exercise], + ), + )), ) as _i14.Future<_i4.Translation>); @override - _i14.Future<_i6.Alias> addExerciseAlias(String? name, int? exerciseId) => (super.noSuchMethod( - Invocation.method(#addExerciseAlias, [name, exerciseId]), - returnValue: _i14.Future<_i6.Alias>.value( - _FakeAlias_4( - this, - Invocation.method(#addExerciseAlias, [name, exerciseId]), - ), + _i14.Future<_i6.Alias> addExerciseAlias( + String? name, + int? exerciseId, + ) => + (super.noSuchMethod( + Invocation.method( + #addExerciseAlias, + [ + name, + exerciseId, + ], ), + returnValue: _i14.Future<_i6.Alias>.value(_FakeAlias_4( + this, + Invocation.method( + #addExerciseAlias, + [ + name, + exerciseId, + ], + ), + )), ) as _i14.Future<_i6.Alias>); @override void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } @@ -337,12 +480,6 @@ class MockUserProvider extends _i1.Mock implements _i16.UserProvider { returnValue: _i17.ThemeMode.system, ) as _i17.ThemeMode); - @override - set themeMode(_i17.ThemeMode? _themeMode) => super.noSuchMethod( - Invocation.setter(#themeMode, _themeMode), - returnValueForMissingStub: null, - ); - @override _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( Invocation.getter(#baseProvider), @@ -361,76 +498,120 @@ class MockUserProvider extends _i1.Mock implements _i16.UserProvider { ), ) as _i7.SharedPreferencesAsync); + @override + set themeMode(_i17.ThemeMode? _themeMode) => super.noSuchMethod( + Invocation.setter( + #themeMode, + _themeMode, + ), + returnValueForMissingStub: null, + ); + @override set prefs(_i7.SharedPreferencesAsync? _prefs) => super.noSuchMethod( - Invocation.setter(#prefs, _prefs), + Invocation.setter( + #prefs, + _prefs, + ), returnValueForMissingStub: null, ); @override set profile(_i18.Profile? _profile) => super.noSuchMethod( - Invocation.setter(#profile, _profile), + Invocation.setter( + #profile, + _profile, + ), 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, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override void setThemeMode(_i17.ThemeMode? mode) => super.noSuchMethod( - Invocation.method(#setThemeMode, [mode]), + Invocation.method( + #setThemeMode, + [mode], + ), returnValueForMissingStub: null, ); @override _i14.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method(#fetchAndSetProfile, []), + Invocation.method( + #fetchAndSetProfile, + [], + ), returnValue: _i14.Future.value(), returnValueForMissingStub: _i14.Future.value(), ) as _i14.Future); @override _i14.Future saveProfile() => (super.noSuchMethod( - Invocation.method(#saveProfile, []), + Invocation.method( + #saveProfile, + [], + ), returnValue: _i14.Future.value(), returnValueForMissingStub: _i14.Future.value(), ) as _i14.Future); @override _i14.Future verifyEmail() => (super.noSuchMethod( - Invocation.method(#verifyEmail, []), + Invocation.method( + #verifyEmail, + [], + ), returnValue: _i14.Future.value(), returnValueForMissingStub: _i14.Future.value(), ) as _i14.Future); @override void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + 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 09a9943ff..627426577 100644 --- a/test/exercises/exercises_detail_widget_test.mocks.dart +++ b/test/exercises/exercises_detail_widget_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/exercises/exercises_detail_widget_test.dart. // Do not manually edit this file. @@ -31,34 +31,73 @@ import 'package:wger/providers/exercises.dart' as _i9; // ignore_for_file: subtype_of_sealed_class 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]. @@ -87,36 +126,18 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { ), ) as _i3.ExerciseDatabase); - @override - set database(_i3.ExerciseDatabase? _database) => super.noSuchMethod( - Invocation.setter(#database, _database), - returnValueForMissingStub: null, - ); - @override List<_i4.Exercise> get exercises => (super.noSuchMethod( Invocation.getter(#exercises), returnValue: <_i4.Exercise>[], ) as List<_i4.Exercise>); - @override - set exercises(List<_i4.Exercise>? _exercises) => super.noSuchMethod( - Invocation.setter(#exercises, _exercises), - returnValueForMissingStub: null, - ); - @override List<_i4.Exercise> get filteredExercises => (super.noSuchMethod( Invocation.getter(#filteredExercises), returnValue: <_i4.Exercise>[], ) as List<_i4.Exercise>); - @override - set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter(#filteredExercises, newFilteredExercises), - returnValueForMissingStub: null, - ); - @override Map> get exerciseByVariation => (super.noSuchMethod( Invocation.getter(#exerciseByVariation), @@ -148,47 +169,97 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { ) as List<_i8.Language>); @override - set languages(List<_i8.Language>? languages) => super.noSuchMethod( - Invocation.setter(#languages, languages), + set database(_i3.ExerciseDatabase? _database) => super.noSuchMethod( + Invocation.setter( + #database, + _database, + ), returnValueForMissingStub: null, ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set exercises(List<_i4.Exercise>? _exercises) => super.noSuchMethod( + Invocation.setter( + #exercises, + _exercises, + ), + returnValueForMissingStub: null, + ); + + @override + set filteredExercises(List<_i4.Exercise>? newFilteredExercises) => super.noSuchMethod( + Invocation.setter( + #filteredExercises, + newFilteredExercises, + ), + returnValueForMissingStub: null, + ); + + @override + 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); @override _i10.Future setFilters(_i9.Filters? newFilters) => (super.noSuchMethod( - Invocation.method(#setFilters, [newFilters]), + Invocation.method( + #setFilters, + [newFilters], + ), returnValue: _i10.Future.value(), returnValueForMissingStub: _i10.Future.value(), ) as _i10.Future); @override void initFilters() => super.noSuchMethod( - Invocation.method(#initFilters, []), + Invocation.method( + #initFilters, + [], + ), returnValueForMissingStub: null, ); @override _i10.Future findByFilters() => (super.noSuchMethod( - Invocation.method(#findByFilters, []), + Invocation.method( + #findByFilters, + [], + ), returnValue: _i10.Future.value(), returnValueForMissingStub: _i10.Future.value(), ) as _i10.Future); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i4.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method(#findExerciseById, [id]), + Invocation.method( + #findExerciseById, + [id], + ), returnValue: _FakeExercise_2( this, - Invocation.method(#findExerciseById, [id]), + Invocation.method( + #findExerciseById, + [id], + ), ), ) as _i4.Exercise); @@ -208,71 +279,110 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { @override _i5.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), returnValue: _FakeExerciseCategory_3( this, - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), ), ) as _i5.ExerciseCategory); @override _i6.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method(#findEquipmentById, [id]), + Invocation.method( + #findEquipmentById, + [id], + ), returnValue: _FakeEquipment_4( this, - Invocation.method(#findEquipmentById, [id]), + Invocation.method( + #findEquipmentById, + [id], + ), ), ) as _i6.Equipment); @override _i7.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method(#findMuscleById, [id]), + Invocation.method( + #findMuscleById, + [id], + ), returnValue: _FakeMuscle_5( this, - Invocation.method(#findMuscleById, [id]), + Invocation.method( + #findMuscleById, + [id], + ), ), ) as _i7.Muscle); @override _i8.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method(#findLanguageById, [id]), + Invocation.method( + #findLanguageById, + [id], + ), returnValue: _FakeLanguage_6( this, - Invocation.method(#findLanguageById, [id]), + Invocation.method( + #findLanguageById, + [id], + ), ), ) as _i8.Language); @override _i10.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetCategoriesFromApi, []), + Invocation.method( + #fetchAndSetCategoriesFromApi, + [], + ), returnValue: _i10.Future.value(), returnValueForMissingStub: _i10.Future.value(), ) as _i10.Future); @override _i10.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetMusclesFromApi, []), + Invocation.method( + #fetchAndSetMusclesFromApi, + [], + ), returnValue: _i10.Future.value(), returnValueForMissingStub: _i10.Future.value(), ) as _i10.Future); @override _i10.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetEquipmentsFromApi, []), + Invocation.method( + #fetchAndSetEquipmentsFromApi, + [], + ), returnValue: _i10.Future.value(), returnValueForMissingStub: _i10.Future.value(), ) as _i10.Future); @override _i10.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetLanguagesFromApi, []), + Invocation.method( + #fetchAndSetLanguagesFromApi, + [], + ), 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]), + Invocation.method( + #fetchAndSetExercise, + [exerciseId], + ), returnValue: _i10.Future<_i4.Exercise?>.value(), ) as _i10.Future<_i4.Exercise?>); @@ -282,40 +392,52 @@ 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, [ + 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, - }), + 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, []), + Invocation.method( + #clearAllCachesAndPrefs, + [], + ), returnValue: _i10.Future.value(), returnValueForMissingStub: _i10.Future.value(), ) as _i10.Future); @override _i10.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method(#fetchAndSetInitialData, []), + Invocation.method( + #fetchAndSetInitialData, + [], + ), returnValue: _i10.Future.value(), returnValueForMissingStub: _i10.Future.value(), ) as _i10.Future); @@ -337,35 +459,50 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { @override _i10.Future updateExerciseCache(_i3.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method(#updateExerciseCache, [database]), + 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]), + 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]), + 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]), + 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]), + Invocation.method( + #fetchAndSetEquipments, + [database], + ), returnValue: _i10.Future.value(), returnValueForMissingStub: _i10.Future.value(), ) as _i10.Future); @@ -380,34 +517,47 @@ class MockExercisesProvider extends _i1.Mock implements _i9.ExercisesProvider { Invocation.method( #searchExercise, [name], - {#languageCode: languageCode, #searchEnglish: searchEnglish}, - ), - returnValue: _i10.Future>.value( - <_i4.Exercise>[], + { + #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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/gallery/gallery_form_test.mocks.dart b/test/gallery/gallery_form_test.mocks.dart index d8bf09cc4..4eb2014d9 100644 --- a/test/gallery/gallery_form_test.mocks.dart +++ b/test/gallery/gallery_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/gallery/gallery_form_test.dart. // Do not manually edit this file. @@ -28,19 +28,43 @@ import 'package:wger/providers/gallery.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -59,77 +83,125 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { @override set images(List<_i5.Image>? _images) => super.noSuchMethod( - Invocation.setter(#images, _images), + Invocation.setter( + #images, + _images, + ), returnValueForMissingStub: null, ); @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); @override - set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), returnValueForMissingStub: null, ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set client(_i3.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i6.Future fetchAndSetGallery() => (super.noSuchMethod( - Invocation.method(#fetchAndSetGallery, []), + Invocation.method( + #fetchAndSetGallery, + [], + ), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future addImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( - Invocation.method(#addImage, [image, imageFile]), + _i6.Future addImage( + _i5.Image? image, + _i7.XFile? imageFile, + ) => + (super.noSuchMethod( + Invocation.method( + #addImage, + [ + image, + imageFile, + ], + ), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future editImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( - Invocation.method(#editImage, [image, imageFile]), + _i6.Future editImage( + _i5.Image? image, + _i7.XFile? imageFile, + ) => + (super.noSuchMethod( + Invocation.method( + #editImage, + [ + image, + imageFile, + ], + ), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( - Invocation.method(#deleteImage, [image]), + 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, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -144,37 +216,58 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i6.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i6.Future.value(), ) as _i6.Future); @override _i6.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override - _i6.Future> post(Map? data, Uri? uri) => + _i6.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i6.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override @@ -183,44 +276,74 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i6.Future>.value( - {}, + 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]), - ), + _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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/gallery/gallery_screen_test.mocks.dart b/test/gallery/gallery_screen_test.mocks.dart index d387e32e4..d1c87483d 100644 --- a/test/gallery/gallery_screen_test.mocks.dart +++ b/test/gallery/gallery_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/gallery/gallery_screen_test.dart. // Do not manually edit this file. @@ -28,19 +28,43 @@ import 'package:wger/providers/gallery.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -59,77 +83,125 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { @override set images(List<_i5.Image>? _images) => super.noSuchMethod( - Invocation.setter(#images, _images), + Invocation.setter( + #images, + _images, + ), returnValueForMissingStub: null, ); @override _i2.AuthProvider get auth => (super.noSuchMethod( Invocation.getter(#auth), - returnValue: _FakeAuthProvider_0(this, Invocation.getter(#auth)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); @override - set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), returnValueForMissingStub: null, ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set client(_i3.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i6.Future fetchAndSetGallery() => (super.noSuchMethod( - Invocation.method(#fetchAndSetGallery, []), + Invocation.method( + #fetchAndSetGallery, + [], + ), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future addImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( - Invocation.method(#addImage, [image, imageFile]), + _i6.Future addImage( + _i5.Image? image, + _i7.XFile? imageFile, + ) => + (super.noSuchMethod( + Invocation.method( + #addImage, + [ + image, + imageFile, + ], + ), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override - _i6.Future editImage(_i5.Image? image, _i7.XFile? imageFile) => (super.noSuchMethod( - Invocation.method(#editImage, [image, imageFile]), + _i6.Future editImage( + _i5.Image? image, + _i7.XFile? imageFile, + ) => + (super.noSuchMethod( + Invocation.method( + #editImage, + [ + image, + imageFile, + ], + ), returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); @override _i6.Future deleteImage(_i5.Image? image) => (super.noSuchMethod( - Invocation.method(#deleteImage, [image]), + 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, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -144,37 +216,58 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i6.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i6.Future.value(), ) as _i6.Future); @override _i6.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override - _i6.Future> post(Map? data, Uri? uri) => + _i6.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i6.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i6.Future>.value({}), ) as _i6.Future>); @override @@ -183,44 +276,74 @@ class MockGalleryProvider extends _i1.Mock implements _i4.GalleryProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i6.Future>.value( - {}, + 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]), - ), + _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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + 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 1504cf8a5..a66979b71 100644 --- a/test/measurements/measurement_categories_screen_test.mocks.dart +++ b/test/measurements/measurement_categories_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/measurements/measurement_categories_screen_test.dart. // Do not manually edit this file. @@ -27,13 +27,23 @@ import 'package:wger/providers/measurement.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -60,76 +70,127 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide ) as List<_i3.MeasurementCategory>); @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, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.MeasurementCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), returnValue: _FakeMeasurementCategory_1( this, - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), ), ) as _i3.MeasurementCategory); @override _i5.Future fetchAndSetCategories() => (super.noSuchMethod( - Invocation.method(#fetchAndSetCategories, []), + 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]), + Invocation.method( + #fetchAndSetCategoryEntries, + [id], + ), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future fetchAndSetAllCategoriesAndEntries() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllCategoriesAndEntries, []), + 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]), + 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]), + 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]), + _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]), + 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]), + _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); @@ -143,38 +204,53 @@ class MockMeasurementProvider extends _i1.Mock implements _i4.MeasurementProvide DateTime? newDate, ) => (super.noSuchMethod( - Invocation.method(#editEntry, [ - id, - categoryId, - newValue, - newNotes, - newDate, - ]), + Invocation.method( + #editEntry, + [ + id, + categoryId, + newValue, + newNotes, + newDate, + ], + ), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/measurements/measurement_provider_test.mocks.dart b/test/measurements/measurement_provider_test.mocks.dart index 830a4440a..8ab034fb3 100644 --- a/test/measurements/measurement_provider_test.mocks.dart +++ b/test/measurements/measurement_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/measurements/measurement_provider_test.dart. // Do not manually edit this file. @@ -25,19 +25,43 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -51,32 +75,46 @@ 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)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); + @override + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -91,37 +129,58 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i5.Future.value(), ) as _i5.Future); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post(Map? data, Uri? uri) => + _i5.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i5.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -130,20 +189,38 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i5.Future>.value( - {}, + 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]), - ), + _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 bfba00ac8..a29b472d2 100644 --- a/test/nutrition/nutritional_meal_form_test.mocks.dart +++ b/test/nutrition/nutritional_meal_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/nutrition/nutritional_meal_form_test.dart. // Do not manually edit this file. @@ -31,30 +31,63 @@ import 'package:wger/providers/nutrition.dart' as _i8; // ignore_for_file: subtype_of_sealed_class 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]. @@ -83,24 +116,12 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP ), ) as _i3.IngredientDatabase); - @override - set database(_i3.IngredientDatabase? _database) => super.noSuchMethod( - Invocation.setter(#database, _database), - returnValueForMissingStub: null, - ); - @override List<_i7.Ingredient> get ingredients => (super.noSuchMethod( Invocation.getter(#ingredients), returnValue: <_i7.Ingredient>[], ) as List<_i7.Ingredient>); - @override - set ingredients(List<_i7.Ingredient>? _ingredients) => super.noSuchMethod( - Invocation.setter(#ingredients, _ingredients), - returnValueForMissingStub: null, - ); - @override List<_i4.NutritionalPlan> get items => (super.noSuchMethod( Invocation.getter(#items), @@ -108,108 +129,190 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP ) as List<_i4.NutritionalPlan>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set database(_i3.IngredientDatabase? _database) => super.noSuchMethod( + Invocation.setter( + #database, + _database, + ), + returnValueForMissingStub: null, + ); + + @override + set ingredients(List<_i7.Ingredient>? _ingredients) => super.noSuchMethod( + Invocation.setter( + #ingredients, + _ingredients, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i4.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeNutritionalPlan_2( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i4.NutritionalPlan); @override - _i5.Meal? findMealById(int? id) => - (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?); + _i5.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( + #findMealById, + [id], + )) as _i5.Meal?); @override _i9.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + Invocation.method( + #fetchAndSetAllPlansSparse, + [], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansFull, []), + 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]), - ), + 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]), - ), + 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]), - ), + 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]), + 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]), + 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])), + _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])), + 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]), + Invocation.method( + #deleteMeal, + [meal], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -220,25 +323,41 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP _i5.Meal? meal, ) => (super.noSuchMethod( - Invocation.method(#addMealItem, [mealItem, meal]), - returnValue: _i9.Future<_i6.MealItem>.value( - _FakeMealItem_4( - this, - Invocation.method(#addMealItem, [mealItem, meal]), - ), + 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]), + Invocation.method( + #deleteMealItem, + [mealItem], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method(#clearIngredientCache, []), + Invocation.method( + #clearIngredientCache, + [], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -254,21 +373,22 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP [ingredientId], {#database: database}, ), - returnValue: _i9.Future<_i7.Ingredient>.value( - _FakeIngredient_5( - this, - 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, []), + Invocation.method( + #fetchIngredientsFromCache, + [], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -283,22 +403,30 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP Invocation.method( #searchIngredient, [name], - {#languageCode: languageCode, #searchEnglish: searchEnglish}, + { + #languageCode: languageCode, + #searchEnglish: searchEnglish, + }, ), returnValue: _i9.Future>.value( - <_i10.IngredientApiSearchEntry>[], - ), + <_i10.IngredientApiSearchEntry>[]), ) as _i9.Future>); @override _i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( - Invocation.method(#searchIngredientWithCode, [code]), + Invocation.method( + #searchIngredientWithCode, + [code], + ), returnValue: _i9.Future<_i7.Ingredient?>.value(), ) as _i9.Future<_i7.Ingredient?>); @override _i9.Future logMealToDiary(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method(#logMealToDiary, [meal]), + Invocation.method( + #logMealToDiary, + [meal], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -310,50 +438,78 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method(#logIngredientToDiary, [ - mealItem, - planId, - dateTime, - ]), + Invocation.method( + #logIngredientToDiary, + [ + mealItem, + planId, + dateTime, + ], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( - Invocation.method(#deleteLog, [logId, 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); @override _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method(#fetchAndSetLogs, [plan]), + Invocation.method( + #fetchAndSetLogs, + [plan], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + 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 f81cb30c4..70d084f2f 100644 --- a/test/nutrition/nutritional_plan_form_test.mocks.dart +++ b/test/nutrition/nutritional_plan_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/nutrition/nutritional_plan_form_test.dart. // Do not manually edit this file. @@ -31,30 +31,63 @@ import 'package:wger/providers/nutrition.dart' as _i8; // ignore_for_file: subtype_of_sealed_class 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]. @@ -83,24 +116,12 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP ), ) as _i3.IngredientDatabase); - @override - set database(_i3.IngredientDatabase? _database) => super.noSuchMethod( - Invocation.setter(#database, _database), - returnValueForMissingStub: null, - ); - @override List<_i7.Ingredient> get ingredients => (super.noSuchMethod( Invocation.getter(#ingredients), returnValue: <_i7.Ingredient>[], ) as List<_i7.Ingredient>); - @override - set ingredients(List<_i7.Ingredient>? _ingredients) => super.noSuchMethod( - Invocation.setter(#ingredients, _ingredients), - returnValueForMissingStub: null, - ); - @override List<_i4.NutritionalPlan> get items => (super.noSuchMethod( Invocation.getter(#items), @@ -108,108 +129,190 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP ) as List<_i4.NutritionalPlan>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set database(_i3.IngredientDatabase? _database) => super.noSuchMethod( + Invocation.setter( + #database, + _database, + ), + returnValueForMissingStub: null, + ); + + @override + set ingredients(List<_i7.Ingredient>? _ingredients) => super.noSuchMethod( + Invocation.setter( + #ingredients, + _ingredients, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i4.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeNutritionalPlan_2( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i4.NutritionalPlan); @override - _i5.Meal? findMealById(int? id) => - (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i5.Meal?); + _i5.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( + #findMealById, + [id], + )) as _i5.Meal?); @override _i9.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + Invocation.method( + #fetchAndSetAllPlansSparse, + [], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansFull, []), + 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]), - ), + 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]), - ), + 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]), - ), + 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]), + 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]), + 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])), + _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])), + 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]), + Invocation.method( + #deleteMeal, + [meal], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -220,25 +323,41 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP _i5.Meal? meal, ) => (super.noSuchMethod( - Invocation.method(#addMealItem, [mealItem, meal]), - returnValue: _i9.Future<_i6.MealItem>.value( - _FakeMealItem_4( - this, - Invocation.method(#addMealItem, [mealItem, meal]), - ), + 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]), + Invocation.method( + #deleteMealItem, + [mealItem], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override _i9.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method(#clearIngredientCache, []), + Invocation.method( + #clearIngredientCache, + [], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -254,21 +373,22 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP [ingredientId], {#database: database}, ), - returnValue: _i9.Future<_i7.Ingredient>.value( - _FakeIngredient_5( - this, - 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, []), + Invocation.method( + #fetchIngredientsFromCache, + [], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -283,22 +403,30 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP Invocation.method( #searchIngredient, [name], - {#languageCode: languageCode, #searchEnglish: searchEnglish}, + { + #languageCode: languageCode, + #searchEnglish: searchEnglish, + }, ), returnValue: _i9.Future>.value( - <_i10.IngredientApiSearchEntry>[], - ), + <_i10.IngredientApiSearchEntry>[]), ) as _i9.Future>); @override _i9.Future<_i7.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( - Invocation.method(#searchIngredientWithCode, [code]), + Invocation.method( + #searchIngredientWithCode, + [code], + ), returnValue: _i9.Future<_i7.Ingredient?>.value(), ) as _i9.Future<_i7.Ingredient?>); @override _i9.Future logMealToDiary(_i5.Meal? meal) => (super.noSuchMethod( - Invocation.method(#logMealToDiary, [meal]), + Invocation.method( + #logMealToDiary, + [meal], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @@ -310,50 +438,78 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i8.NutritionPlansP DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method(#logIngredientToDiary, [ - mealItem, - planId, - dateTime, - ]), + Invocation.method( + #logIngredientToDiary, + [ + mealItem, + planId, + dateTime, + ], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override - _i9.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( - Invocation.method(#deleteLog, [logId, 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); @override _i9.Future fetchAndSetLogs(_i4.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method(#fetchAndSetLogs, [plan]), + Invocation.method( + #fetchAndSetLogs, + [plan], + ), returnValue: _i9.Future.value(), returnValueForMissingStub: _i9.Future.value(), ) as _i9.Future); @override void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + 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 ef2f03d14..4f6dd8c2b 100644 --- a/test/nutrition/nutritional_plan_screen_test.mocks.dart +++ b/test/nutrition/nutritional_plan_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/nutrition/nutritional_plan_screen_test.dart. // Do not manually edit this file. @@ -30,24 +30,53 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -61,32 +90,46 @@ 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)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); + @override + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -101,37 +144,58 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i5.Future.value(), ) as _i5.Future); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post(Map? data, Uri? uri) => + _i5.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i5.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -140,21 +204,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i5.Future>.value( - {}, + 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]), - ), + _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>); } @@ -166,107 +248,153 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { _i1.throwOnMissingStub(this); } - @override - set token(String? _token) => super.noSuchMethod( - Invocation.setter(#token, _token), - returnValueForMissingStub: null, - ); - - @override - set serverUrl(String? _serverUrl) => super.noSuchMethod( - Invocation.setter(#serverUrl, _serverUrl), - returnValueForMissingStub: null, - ); - - @override - set serverVersion(String? _serverVersion) => super.noSuchMethod( - Invocation.setter(#serverVersion, _serverVersion), - returnValueForMissingStub: null, - ); - - @override - set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod( - Invocation.setter(#applicationVersion, _applicationVersion), - returnValueForMissingStub: null, - ); - @override Map get metadata => (super.noSuchMethod( Invocation.getter(#metadata), returnValue: {}, ) as Map); - @override - set metadata(Map? _metadata) => super.noSuchMethod( - Invocation.setter(#metadata, _metadata), - returnValueForMissingStub: null, - ); - @override _i2.AuthState get state => (super.noSuchMethod( Invocation.getter(#state), returnValue: _i2.AuthState.updateRequired, ) as _i2.AuthState); - @override - set state(_i2.AuthState? _state) => super.noSuchMethod( - Invocation.setter(#state, _state), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); @override - set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + 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); + + @override + set token(String? _token) => super.noSuchMethod( + Invocation.setter( + #token, + _token, + ), returnValueForMissingStub: null, ); @override - bool get dataInit => - (super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false) as bool); + set serverUrl(String? _serverUrl) => super.noSuchMethod( + Invocation.setter( + #serverUrl, + _serverUrl, + ), + returnValueForMissingStub: null, + ); + + @override + set serverVersion(String? _serverVersion) => super.noSuchMethod( + Invocation.setter( + #serverVersion, + _serverVersion, + ), + returnValueForMissingStub: null, + ); + + @override + set applicationVersion(_i6.PackageInfo? _applicationVersion) => super.noSuchMethod( + Invocation.setter( + #applicationVersion, + _applicationVersion, + ), + returnValueForMissingStub: null, + ); + + @override + set metadata(Map? _metadata) => super.noSuchMethod( + Invocation.setter( + #metadata, + _metadata, + ), + returnValueForMissingStub: null, + ); + + @override + set state(_i2.AuthState? _state) => super.noSuchMethod( + Invocation.setter( + #state, + _state, + ), + returnValueForMissingStub: null, + ); + + @override + set client(_i3.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); @override set dataInit(bool? _dataInit) => super.noSuchMethod( - Invocation.setter(#dataInit, _dataInit), + Invocation.setter( + #dataInit, + _dataInit, + ), returnValueForMissingStub: null, ); @override - bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool); - - @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, []), + Invocation.method( + #setServerVersion, + [], + ), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future setApplicationVersion() => (super.noSuchMethod( - Invocation.method(#setApplicationVersion, []), + 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]), + 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]), + Invocation.method( + #applicationUpdateRequired, + [version], + ), returnValue: _i5.Future.value(false), ) as _i5.Future); @@ -279,16 +407,18 @@ 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, + 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 @@ -298,67 +428,101 @@ class MockAuthProvider extends _i1.Mock implements _i2.AuthProvider { String? serverUrl, ) => (super.noSuchMethod( - Invocation.method(#login, [username, password, serverUrl]), - returnValue: _i5.Future<_i2.LoginActions>.value( - _i2.LoginActions.update, + Invocation.method( + #login, + [ + username, + password, + serverUrl, + ], ), + 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, []), - ), + 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, []), + 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}), + Invocation.method( + #logout, + [], + {#shouldNotify: shouldNotify}, + ), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override String getAppNameHeader() => (super.noSuchMethod( - Invocation.method(#getAppNameHeader, []), + Invocation.method( + #getAppNameHeader, + [], + ), returnValue: _i7.dummyValue( this, - Invocation.method(#getAppNameHeader, []), + Invocation.method( + #getAppNameHeader, + [], + ), ), ) as String); @override void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } @@ -372,25 +536,45 @@ class MockClient extends _i1.Mock implements _i3.Client { } @override - _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}), - ), + _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>); @override - _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}), - ), + _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>); @override @@ -404,18 +588,24 @@ class MockClient extends _i1.Mock implements _i3.Client { Invocation.method( #post, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -429,18 +619,24 @@ class MockClient extends _i1.Mock implements _i3.Client { Invocation.method( #put, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -454,18 +650,24 @@ class MockClient extends _i1.Mock implements _i3.Client { Invocation.method( #patch, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -479,29 +681,45 @@ class MockClient extends _i1.Mock implements _i3.Client { Invocation.method( #delete, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #headers: headers, + #body: body, + #encoding: encoding, + }, ), - returnValue: _i5.Future<_i3.Response>.value( - _FakeResponse_3( - this, - 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}) => (super.noSuchMethod( - Invocation.method(#read, [url], {#headers: headers}), - returnValue: _i5.Future.value( - _i7.dummyValue( - this, - Invocation.method(#read, [url], {#headers: 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); @override @@ -510,24 +728,35 @@ class MockClient extends _i1.Mock implements _i3.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method(#readBytes, [url], {#headers: headers}), + Invocation.method( + #readBytes, + [url], + {#headers: headers}, + ), returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), ) as _i5.Future<_i10.Uint8List>); @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]), - ), + 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, []), + 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 f37db6daa..cda2dde86 100644 --- a/test/nutrition/nutritional_plans_screen_test.mocks.dart +++ b/test/nutrition/nutritional_plans_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/nutrition/nutritional_plans_screen_test.dart. // Do not manually edit this file. @@ -30,24 +30,53 @@ import 'package:wger/providers/base_provider.dart' as _i8; // ignore_for_file: subtype_of_sealed_class 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]. @@ -58,107 +87,153 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { _i1.throwOnMissingStub(this); } - @override - set token(String? _token) => super.noSuchMethod( - Invocation.setter(#token, _token), - returnValueForMissingStub: null, - ); - - @override - set serverUrl(String? _serverUrl) => super.noSuchMethod( - Invocation.setter(#serverUrl, _serverUrl), - returnValueForMissingStub: null, - ); - - @override - set serverVersion(String? _serverVersion) => super.noSuchMethod( - Invocation.setter(#serverVersion, _serverVersion), - returnValueForMissingStub: null, - ); - - @override - set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod( - Invocation.setter(#applicationVersion, _applicationVersion), - returnValueForMissingStub: null, - ); - @override Map get metadata => (super.noSuchMethod( Invocation.getter(#metadata), returnValue: {}, ) as Map); - @override - set metadata(Map? _metadata) => super.noSuchMethod( - Invocation.setter(#metadata, _metadata), - returnValueForMissingStub: null, - ); - @override _i3.AuthState get state => (super.noSuchMethod( Invocation.getter(#state), returnValue: _i3.AuthState.updateRequired, ) as _i3.AuthState); - @override - set state(_i3.AuthState? _state) => super.noSuchMethod( - Invocation.setter(#state, _state), - returnValueForMissingStub: null, - ); - @override _i2.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_0(this, Invocation.getter(#client)), + returnValue: _FakeClient_0( + this, + Invocation.getter(#client), + ), ) as _i2.Client); @override - set client(_i2.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + 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); + + @override + set token(String? _token) => super.noSuchMethod( + Invocation.setter( + #token, + _token, + ), returnValueForMissingStub: null, ); @override - bool get dataInit => - (super.noSuchMethod(Invocation.getter(#dataInit), returnValue: false) as bool); + set serverUrl(String? _serverUrl) => super.noSuchMethod( + Invocation.setter( + #serverUrl, + _serverUrl, + ), + returnValueForMissingStub: null, + ); + + @override + set serverVersion(String? _serverVersion) => super.noSuchMethod( + Invocation.setter( + #serverVersion, + _serverVersion, + ), + returnValueForMissingStub: null, + ); + + @override + set applicationVersion(_i4.PackageInfo? _applicationVersion) => super.noSuchMethod( + Invocation.setter( + #applicationVersion, + _applicationVersion, + ), + returnValueForMissingStub: null, + ); + + @override + set metadata(Map? _metadata) => super.noSuchMethod( + Invocation.setter( + #metadata, + _metadata, + ), + returnValueForMissingStub: null, + ); + + @override + set state(_i3.AuthState? _state) => super.noSuchMethod( + Invocation.setter( + #state, + _state, + ), + returnValueForMissingStub: null, + ); + + @override + set client(_i2.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); @override set dataInit(bool? _dataInit) => super.noSuchMethod( - Invocation.setter(#dataInit, _dataInit), + Invocation.setter( + #dataInit, + _dataInit, + ), returnValueForMissingStub: null, ); @override - bool get isAuth => (super.noSuchMethod(Invocation.getter(#isAuth), returnValue: false) as bool); - - @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, []), + Invocation.method( + #setServerVersion, + [], + ), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override _i5.Future setApplicationVersion() => (super.noSuchMethod( - Invocation.method(#setApplicationVersion, []), + 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]), + 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]), + Invocation.method( + #applicationUpdateRequired, + [version], + ), returnValue: _i5.Future.value(false), ) as _i5.Future); @@ -171,16 +246,18 @@ 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, + 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 @@ -190,67 +267,101 @@ class MockAuthProvider extends _i1.Mock implements _i3.AuthProvider { String? serverUrl, ) => (super.noSuchMethod( - Invocation.method(#login, [username, password, serverUrl]), - returnValue: _i5.Future<_i3.LoginActions>.value( - _i3.LoginActions.update, + Invocation.method( + #login, + [ + username, + password, + serverUrl, + ], ), + 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, []), - ), + 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, []), + 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}), + Invocation.method( + #logout, + [], + {#shouldNotify: shouldNotify}, + ), returnValue: _i5.Future.value(), returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); @override String getAppNameHeader() => (super.noSuchMethod( - Invocation.method(#getAppNameHeader, []), + Invocation.method( + #getAppNameHeader, + [], + ), returnValue: _i6.dummyValue( this, - Invocation.method(#getAppNameHeader, []), + Invocation.method( + #getAppNameHeader, + [], + ), ), ) as String); @override void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } @@ -266,32 +377,46 @@ 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)), + returnValue: _FakeAuthProvider_1( + this, + Invocation.getter(#auth), + ), ) as _i3.AuthProvider); - @override - set auth(_i3.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i2.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_0(this, Invocation.getter(#client)), + returnValue: _FakeClient_0( + this, + Invocation.getter(#client), + ), ) as _i2.Client); + @override + set auth(_i3.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i2.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -306,37 +431,58 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i5.Future.value(), ) as _i5.Future); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post(Map? data, Uri? uri) => + _i5.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i5.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -345,21 +491,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i8.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i5.Future>.value( - {}, + 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]), - ), + _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>); } @@ -372,25 +536,45 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _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}), - ), + _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>); @override - _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}), - ), + _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>); @override @@ -404,18 +588,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #post, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -429,18 +619,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #put, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -454,18 +650,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #patch, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -479,29 +681,45 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #delete, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #headers: headers, + #body: body, + #encoding: encoding, + }, ), - returnValue: _i5.Future<_i2.Response>.value( - _FakeResponse_3( - this, - 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}) => (super.noSuchMethod( - Invocation.method(#read, [url], {#headers: headers}), - returnValue: _i5.Future.value( - _i6.dummyValue( - this, - Invocation.method(#read, [url], {#headers: 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); @override @@ -510,24 +728,35 @@ class MockClient extends _i1.Mock implements _i2.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method(#readBytes, [url], {#headers: headers}), + Invocation.method( + #readBytes, + [url], + {#headers: headers}, + ), returnValue: _i5.Future<_i10.Uint8List>.value(_i10.Uint8List(0)), ) as _i5.Future<_i10.Uint8List>); @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]), - ), + 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, []), + Invocation.method( + #close, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/other/base_provider_test.mocks.dart b/test/other/base_provider_test.mocks.dart index 8d6e705f4..381dd9753 100644 --- a/test/other/base_provider_test.mocks.dart +++ b/test/other/base_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/other/base_provider_test.dart. // Do not manually edit this file. @@ -26,12 +26,23 @@ import 'package:mockito/src/dummies.dart' as _i5; // ignore_for_file: subtype_of_sealed_class 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]. @@ -43,25 +54,45 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _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}), - ), + _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>); @override - _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}), - ), + _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>); @override @@ -75,18 +106,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #post, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -100,18 +137,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #put, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -125,18 +168,24 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #patch, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #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}, - ), + 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 @@ -150,29 +199,45 @@ class MockClient extends _i1.Mock implements _i2.Client { Invocation.method( #delete, [url], - {#headers: headers, #body: body, #encoding: encoding}, + { + #headers: headers, + #body: body, + #encoding: encoding, + }, ), - returnValue: _i3.Future<_i2.Response>.value( - _FakeResponse_0( - this, - 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}) => (super.noSuchMethod( - Invocation.method(#read, [url], {#headers: headers}), - returnValue: _i3.Future.value( - _i5.dummyValue( - this, - Invocation.method(#read, [url], {#headers: 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); @override @@ -181,24 +246,35 @@ class MockClient extends _i1.Mock implements _i2.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method(#readBytes, [url], {#headers: headers}), + Invocation.method( + #readBytes, + [url], + {#headers: headers}, + ), returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), ) as _i3.Future<_i6.Uint8List>); @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]), - ), + 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, []), + Invocation.method( + #close, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/user/provider_test.mocks.dart b/test/user/provider_test.mocks.dart index aa49e069a..ae6a85607 100644 --- a/test/user/provider_test.mocks.dart +++ b/test/user/provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/user/provider_test.dart. // Do not manually edit this file. @@ -25,19 +25,43 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -51,32 +75,46 @@ 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)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); + @override + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -91,37 +129,58 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i5.Future.value(), ) as _i5.Future); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post(Map? data, Uri? uri) => + _i5.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i5.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -130,20 +189,38 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i5.Future>.value( - {}, + 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]), - ), + _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 7b1bd5649..0e636f431 100644 --- a/test/weight/weight_provider_test.mocks.dart +++ b/test/weight/weight_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/weight/weight_provider_test.dart. // Do not manually edit this file. @@ -25,19 +25,43 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -51,32 +75,46 @@ 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)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); + @override + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -91,37 +129,58 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i5.Future.value(), ) as _i5.Future); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post(Map? data, Uri? uri) => + _i5.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i5.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -130,20 +189,38 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i5.Future>.value( - {}, + 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]), - ), + _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 4edb80d21..0e16dd26b 100644 --- a/test/weight/weight_screen_test.mocks.dart +++ b/test/weight/weight_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/weight/weight_screen_test.dart. // Do not manually edit this file. @@ -37,39 +37,83 @@ import 'package:wger/providers/user.dart' as _i13; // ignore_for_file: subtype_of_sealed_class 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]. @@ -97,84 +141,126 @@ class MockBodyWeightProvider extends _i1.Mock implements _i10.BodyWeightProvider @override set items(List<_i3.WeightEntry>? entries) => super.noSuchMethod( - Invocation.setter(#items, entries), + 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, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightEntry findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeWeightEntry_1( this, - Invocation.method(#findById, [id]), + 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>[], + 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])), + 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]), + 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]), + 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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } @@ -193,12 +279,6 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider { returnValue: _i14.ThemeMode.system, ) as _i14.ThemeMode); - @override - set themeMode(_i14.ThemeMode? _themeMode) => super.noSuchMethod( - Invocation.setter(#themeMode, _themeMode), - returnValueForMissingStub: null, - ); - @override _i2.WgerBaseProvider get baseProvider => (super.noSuchMethod( Invocation.getter(#baseProvider), @@ -217,76 +297,120 @@ class MockUserProvider extends _i1.Mock implements _i13.UserProvider { ), ) as _i4.SharedPreferencesAsync); + @override + set themeMode(_i14.ThemeMode? _themeMode) => super.noSuchMethod( + Invocation.setter( + #themeMode, + _themeMode, + ), + returnValueForMissingStub: null, + ); + @override set prefs(_i4.SharedPreferencesAsync? _prefs) => super.noSuchMethod( - Invocation.setter(#prefs, _prefs), + Invocation.setter( + #prefs, + _prefs, + ), returnValueForMissingStub: null, ); @override set profile(_i15.Profile? _profile) => super.noSuchMethod( - Invocation.setter(#profile, _profile), + Invocation.setter( + #profile, + _profile, + ), 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, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override void setThemeMode(_i14.ThemeMode? mode) => super.noSuchMethod( - Invocation.method(#setThemeMode, [mode]), + Invocation.method( + #setThemeMode, + [mode], + ), returnValueForMissingStub: null, ); @override _i11.Future fetchAndSetProfile() => (super.noSuchMethod( - Invocation.method(#fetchAndSetProfile, []), + Invocation.method( + #fetchAndSetProfile, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future saveProfile() => (super.noSuchMethod( - Invocation.method(#saveProfile, []), + Invocation.method( + #saveProfile, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future verifyEmail() => (super.noSuchMethod( - Invocation.method(#verifyEmail, []), + 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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } @@ -317,24 +441,12 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans ), ) as _i5.IngredientDatabase); - @override - set database(_i5.IngredientDatabase? _database) => super.noSuchMethod( - Invocation.setter(#database, _database), - returnValueForMissingStub: null, - ); - @override List<_i9.Ingredient> get ingredients => (super.noSuchMethod( Invocation.getter(#ingredients), returnValue: <_i9.Ingredient>[], ) as List<_i9.Ingredient>); - @override - set ingredients(List<_i9.Ingredient>? _ingredients) => super.noSuchMethod( - Invocation.setter(#ingredients, _ingredients), - returnValueForMissingStub: null, - ); - @override List<_i6.NutritionalPlan> get items => (super.noSuchMethod( Invocation.getter(#items), @@ -342,108 +454,190 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans ) as List<_i6.NutritionalPlan>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set database(_i5.IngredientDatabase? _database) => super.noSuchMethod( + Invocation.setter( + #database, + _database, + ), + returnValueForMissingStub: null, + ); + + @override + set ingredients(List<_i9.Ingredient>? _ingredients) => super.noSuchMethod( + Invocation.setter( + #ingredients, + _ingredients, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i6.NutritionalPlan findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeNutritionalPlan_4( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i6.NutritionalPlan); @override - _i7.Meal? findMealById(int? id) => - (super.noSuchMethod(Invocation.method(#findMealById, [id])) as _i7.Meal?); + _i7.Meal? findMealById(int? id) => (super.noSuchMethod(Invocation.method( + #findMealById, + [id], + )) as _i7.Meal?); @override _i11.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + Invocation.method( + #fetchAndSetAllPlansSparse, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetAllPlansFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansFull, []), + 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]), - ), + 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]), - ), + 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]), - ), + 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]), + 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]), + 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])), + _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])), + 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]), + Invocation.method( + #deleteMeal, + [meal], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -454,25 +648,41 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans _i7.Meal? meal, ) => (super.noSuchMethod( - Invocation.method(#addMealItem, [mealItem, meal]), - returnValue: _i11.Future<_i8.MealItem>.value( - _FakeMealItem_6( - this, - Invocation.method(#addMealItem, [mealItem, meal]), - ), + 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]), + Invocation.method( + #deleteMealItem, + [mealItem], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future clearIngredientCache() => (super.noSuchMethod( - Invocation.method(#clearIngredientCache, []), + Invocation.method( + #clearIngredientCache, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -488,21 +698,22 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans [ingredientId], {#database: database}, ), - returnValue: _i11.Future<_i9.Ingredient>.value( - _FakeIngredient_7( - this, - 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, []), + Invocation.method( + #fetchIngredientsFromCache, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -517,22 +728,30 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans Invocation.method( #searchIngredient, [name], - {#languageCode: languageCode, #searchEnglish: searchEnglish}, + { + #languageCode: languageCode, + #searchEnglish: searchEnglish, + }, ), returnValue: _i11.Future>.value( - <_i17.IngredientApiSearchEntry>[], - ), + <_i17.IngredientApiSearchEntry>[]), ) as _i11.Future>); @override _i11.Future<_i9.Ingredient?> searchIngredientWithCode(String? code) => (super.noSuchMethod( - Invocation.method(#searchIngredientWithCode, [code]), + Invocation.method( + #searchIngredientWithCode, + [code], + ), returnValue: _i11.Future<_i9.Ingredient?>.value(), ) as _i11.Future<_i9.Ingredient?>); @override _i11.Future logMealToDiary(_i7.Meal? meal) => (super.noSuchMethod( - Invocation.method(#logMealToDiary, [meal]), + Invocation.method( + #logMealToDiary, + [meal], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -544,50 +763,78 @@ class MockNutritionPlansProvider extends _i1.Mock implements _i16.NutritionPlans DateTime? dateTime, ]) => (super.noSuchMethod( - Invocation.method(#logIngredientToDiary, [ - mealItem, - planId, - dateTime, - ]), + Invocation.method( + #logIngredientToDiary, + [ + mealItem, + planId, + dateTime, + ], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override - _i11.Future deleteLog(int? logId, int? planId) => (super.noSuchMethod( - Invocation.method(#deleteLog, [logId, 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); @override _i11.Future fetchAndSetLogs(_i6.NutritionalPlan? plan) => (super.noSuchMethod( - Invocation.method(#fetchAndSetLogs, [plan]), + 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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/day_form_test.mocks.dart b/test/workout/day_form_test.mocks.dart index ccd1bd6f5..12eabddcb 100644 --- a/test/workout/day_form_test.mocks.dart +++ b/test/workout/day_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/day_form_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/gym_mode_screen_test.mocks.dart b/test/workout/gym_mode_screen_test.mocks.dart index ce4da1a99..8e6d257b7 100644 --- a/test/workout/gym_mode_screen_test.mocks.dart +++ b/test/workout/gym_mode_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/gym_mode_screen_test.dart. // Do not manually edit this file. @@ -33,50 +33,113 @@ import 'package:wger/providers/exercises.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -90,32 +153,46 @@ 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)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); + @override + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -130,27 +207,41 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i11.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i11.Future.value(), ) as _i11.Future); @override _i11.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i11.Future>.value([]), ) as _i11.Future>); @@ -160,10 +251,14 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i11.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i11.Future>.value({}), ) as _i11.Future>); @override @@ -172,21 +267,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i11.Future>.value( - {}, + 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]), - ), + _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>); } @@ -216,36 +329,18 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { ), ) as _i5.ExerciseDatabase); - @override - set database(_i5.ExerciseDatabase? _database) => super.noSuchMethod( - Invocation.setter(#database, _database), - returnValueForMissingStub: null, - ); - @override List<_i6.Exercise> get exercises => (super.noSuchMethod( Invocation.getter(#exercises), returnValue: <_i6.Exercise>[], ) as List<_i6.Exercise>); - @override - set exercises(List<_i6.Exercise>? _exercises) => super.noSuchMethod( - Invocation.setter(#exercises, _exercises), - returnValueForMissingStub: null, - ); - @override List<_i6.Exercise> get filteredExercises => (super.noSuchMethod( Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[], ) as List<_i6.Exercise>); - @override - set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter(#filteredExercises, newFilteredExercises), - returnValueForMissingStub: null, - ); - @override Map> get exerciseByVariation => (super.noSuchMethod( Invocation.getter(#exerciseByVariation), @@ -277,47 +372,97 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { ) as List<_i10.Language>); @override - set languages(List<_i10.Language>? languages) => super.noSuchMethod( - Invocation.setter(#languages, languages), + set database(_i5.ExerciseDatabase? _database) => super.noSuchMethod( + Invocation.setter( + #database, + _database, + ), returnValueForMissingStub: null, ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set exercises(List<_i6.Exercise>? _exercises) => super.noSuchMethod( + Invocation.setter( + #exercises, + _exercises, + ), + returnValueForMissingStub: null, + ); + + @override + set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod( + Invocation.setter( + #filteredExercises, + newFilteredExercises, + ), + returnValueForMissingStub: null, + ); + + @override + 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); @override _i11.Future setFilters(_i12.Filters? newFilters) => (super.noSuchMethod( - Invocation.method(#setFilters, [newFilters]), + Invocation.method( + #setFilters, + [newFilters], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override void initFilters() => super.noSuchMethod( - Invocation.method(#initFilters, []), + Invocation.method( + #initFilters, + [], + ), returnValueForMissingStub: null, ); @override _i11.Future findByFilters() => (super.noSuchMethod( - Invocation.method(#findByFilters, []), + Invocation.method( + #findByFilters, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i6.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method(#findExerciseById, [id]), + Invocation.method( + #findExerciseById, + [id], + ), returnValue: _FakeExercise_6( this, - Invocation.method(#findExerciseById, [id]), + Invocation.method( + #findExerciseById, + [id], + ), ), ) as _i6.Exercise); @@ -337,71 +482,110 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override _i7.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), returnValue: _FakeExerciseCategory_7( this, - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), ), ) as _i7.ExerciseCategory); @override _i8.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method(#findEquipmentById, [id]), + Invocation.method( + #findEquipmentById, + [id], + ), returnValue: _FakeEquipment_8( this, - Invocation.method(#findEquipmentById, [id]), + Invocation.method( + #findEquipmentById, + [id], + ), ), ) as _i8.Equipment); @override _i9.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method(#findMuscleById, [id]), + Invocation.method( + #findMuscleById, + [id], + ), returnValue: _FakeMuscle_9( this, - Invocation.method(#findMuscleById, [id]), + Invocation.method( + #findMuscleById, + [id], + ), ), ) as _i9.Muscle); @override _i10.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method(#findLanguageById, [id]), + Invocation.method( + #findLanguageById, + [id], + ), returnValue: _FakeLanguage_10( this, - Invocation.method(#findLanguageById, [id]), + Invocation.method( + #findLanguageById, + [id], + ), ), ) as _i10.Language); @override _i11.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetCategoriesFromApi, []), + Invocation.method( + #fetchAndSetCategoriesFromApi, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetMusclesFromApi, []), + Invocation.method( + #fetchAndSetMusclesFromApi, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetEquipmentsFromApi, []), + Invocation.method( + #fetchAndSetEquipmentsFromApi, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetLanguagesFromApi, []), + Invocation.method( + #fetchAndSetLanguagesFromApi, + [], + ), 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]), + Invocation.method( + #fetchAndSetExercise, + [exerciseId], + ), returnValue: _i11.Future<_i6.Exercise?>.value(), ) as _i11.Future<_i6.Exercise?>); @@ -411,40 +595,52 @@ 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, [ + 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, - }), + 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, []), + Invocation.method( + #clearAllCachesAndPrefs, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method(#fetchAndSetInitialData, []), + Invocation.method( + #fetchAndSetInitialData, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -466,35 +662,50 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override _i11.Future updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method(#updateExerciseCache, [database]), + 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]), + 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]), + 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]), + 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]), + Invocation.method( + #fetchAndSetEquipments, + [database], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -509,34 +720,47 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { Invocation.method( #searchExercise, [name], - {#languageCode: languageCode, #searchEnglish: searchEnglish}, - ), - returnValue: _i11.Future>.value( - <_i6.Exercise>[], + { + #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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/gym_mode_session_screen_test.mocks.dart b/test/workout/gym_mode_session_screen_test.mocks.dart index 3297573a8..45a4f4b92 100644 --- a/test/workout/gym_mode_session_screen_test.mocks.dart +++ b/test/workout/gym_mode_session_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/gym_mode_session_screen_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/repetition_unit_form_widget_test.mocks.dart b/test/workout/repetition_unit_form_widget_test.mocks.dart index 7764f3366..aff5b092a 100644 --- a/test/workout/repetition_unit_form_widget_test.mocks.dart +++ b/test/workout/repetition_unit_form_widget_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/repetition_unit_form_widget_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/routine_edit_screen_test.mocks.dart b/test/workout/routine_edit_screen_test.mocks.dart index 8fbd8e1e2..43191349d 100644 --- a/test/workout/routine_edit_screen_test.mocks.dart +++ b/test/workout/routine_edit_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/routine_edit_screen_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/routine_edit_test.mocks.dart b/test/workout/routine_edit_test.mocks.dart index e0874cb30..3be95e000 100644 --- a/test/workout/routine_edit_test.mocks.dart +++ b/test/workout/routine_edit_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/routine_edit_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/routine_form_test.mocks.dart b/test/workout/routine_form_test.mocks.dart index af723622b..577db580f 100644 --- a/test/workout/routine_form_test.mocks.dart +++ b/test/workout/routine_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/routine_form_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/routine_logs_screen_test.mocks.dart b/test/workout/routine_logs_screen_test.mocks.dart index c5b9828f5..f62965ba2 100644 --- a/test/workout/routine_logs_screen_test.mocks.dart +++ b/test/workout/routine_logs_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/routine_logs_screen_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/routine_screen_test.mocks.dart b/test/workout/routine_screen_test.mocks.dart index 4edf94096..2082ea112 100644 --- a/test/workout/routine_screen_test.mocks.dart +++ b/test/workout/routine_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/routine_screen_test.dart. // Do not manually edit this file. @@ -25,19 +25,43 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -51,32 +75,46 @@ 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)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); + @override + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -91,37 +129,58 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i5.Future.value(), ) as _i5.Future); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post(Map? data, Uri? uri) => + _i5.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i5.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -130,20 +189,38 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i5.Future>.value( - {}, + 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]), - ), + _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/workout/routines_provider_test.mocks.dart b/test/workout/routines_provider_test.mocks.dart index 35a1cc8d3..30dc882b3 100644 --- a/test/workout/routines_provider_test.mocks.dart +++ b/test/workout/routines_provider_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/routines_provider_test.dart. // Do not manually edit this file. @@ -33,50 +33,113 @@ import 'package:wger/providers/exercises.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -90,32 +153,46 @@ 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)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); + @override + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -130,27 +207,41 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i11.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i11.Future.value(), ) as _i11.Future); @override _i11.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i11.Future>.value([]), ) as _i11.Future>); @@ -160,10 +251,14 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i11.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i11.Future>.value({}), ) as _i11.Future>); @override @@ -172,21 +267,39 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i11.Future>.value( - {}, + 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]), - ), + _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>); } @@ -216,36 +329,18 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { ), ) as _i5.ExerciseDatabase); - @override - set database(_i5.ExerciseDatabase? _database) => super.noSuchMethod( - Invocation.setter(#database, _database), - returnValueForMissingStub: null, - ); - @override List<_i6.Exercise> get exercises => (super.noSuchMethod( Invocation.getter(#exercises), returnValue: <_i6.Exercise>[], ) as List<_i6.Exercise>); - @override - set exercises(List<_i6.Exercise>? _exercises) => super.noSuchMethod( - Invocation.setter(#exercises, _exercises), - returnValueForMissingStub: null, - ); - @override List<_i6.Exercise> get filteredExercises => (super.noSuchMethod( Invocation.getter(#filteredExercises), returnValue: <_i6.Exercise>[], ) as List<_i6.Exercise>); - @override - set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod( - Invocation.setter(#filteredExercises, newFilteredExercises), - returnValueForMissingStub: null, - ); - @override Map> get exerciseByVariation => (super.noSuchMethod( Invocation.getter(#exerciseByVariation), @@ -277,47 +372,97 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { ) as List<_i10.Language>); @override - set languages(List<_i10.Language>? languages) => super.noSuchMethod( - Invocation.setter(#languages, languages), + set database(_i5.ExerciseDatabase? _database) => super.noSuchMethod( + Invocation.setter( + #database, + _database, + ), returnValueForMissingStub: null, ); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set exercises(List<_i6.Exercise>? _exercises) => super.noSuchMethod( + Invocation.setter( + #exercises, + _exercises, + ), + returnValueForMissingStub: null, + ); + + @override + set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod( + Invocation.setter( + #filteredExercises, + newFilteredExercises, + ), + returnValueForMissingStub: null, + ); + + @override + 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); @override _i11.Future setFilters(_i12.Filters? newFilters) => (super.noSuchMethod( - Invocation.method(#setFilters, [newFilters]), + Invocation.method( + #setFilters, + [newFilters], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override void initFilters() => super.noSuchMethod( - Invocation.method(#initFilters, []), + Invocation.method( + #initFilters, + [], + ), returnValueForMissingStub: null, ); @override _i11.Future findByFilters() => (super.noSuchMethod( - Invocation.method(#findByFilters, []), + Invocation.method( + #findByFilters, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i6.Exercise findExerciseById(int? id) => (super.noSuchMethod( - Invocation.method(#findExerciseById, [id]), + Invocation.method( + #findExerciseById, + [id], + ), returnValue: _FakeExercise_6( this, - Invocation.method(#findExerciseById, [id]), + Invocation.method( + #findExerciseById, + [id], + ), ), ) as _i6.Exercise); @@ -337,71 +482,110 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override _i7.ExerciseCategory findCategoryById(int? id) => (super.noSuchMethod( - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), returnValue: _FakeExerciseCategory_7( this, - Invocation.method(#findCategoryById, [id]), + Invocation.method( + #findCategoryById, + [id], + ), ), ) as _i7.ExerciseCategory); @override _i8.Equipment findEquipmentById(int? id) => (super.noSuchMethod( - Invocation.method(#findEquipmentById, [id]), + Invocation.method( + #findEquipmentById, + [id], + ), returnValue: _FakeEquipment_8( this, - Invocation.method(#findEquipmentById, [id]), + Invocation.method( + #findEquipmentById, + [id], + ), ), ) as _i8.Equipment); @override _i9.Muscle findMuscleById(int? id) => (super.noSuchMethod( - Invocation.method(#findMuscleById, [id]), + Invocation.method( + #findMuscleById, + [id], + ), returnValue: _FakeMuscle_9( this, - Invocation.method(#findMuscleById, [id]), + Invocation.method( + #findMuscleById, + [id], + ), ), ) as _i9.Muscle); @override _i10.Language findLanguageById(int? id) => (super.noSuchMethod( - Invocation.method(#findLanguageById, [id]), + Invocation.method( + #findLanguageById, + [id], + ), returnValue: _FakeLanguage_10( this, - Invocation.method(#findLanguageById, [id]), + Invocation.method( + #findLanguageById, + [id], + ), ), ) as _i10.Language); @override _i11.Future fetchAndSetCategoriesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetCategoriesFromApi, []), + Invocation.method( + #fetchAndSetCategoriesFromApi, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetMusclesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetMusclesFromApi, []), + Invocation.method( + #fetchAndSetMusclesFromApi, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetEquipmentsFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetEquipmentsFromApi, []), + Invocation.method( + #fetchAndSetEquipmentsFromApi, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetLanguagesFromApi() => (super.noSuchMethod( - Invocation.method(#fetchAndSetLanguagesFromApi, []), + Invocation.method( + #fetchAndSetLanguagesFromApi, + [], + ), 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]), + Invocation.method( + #fetchAndSetExercise, + [exerciseId], + ), returnValue: _i11.Future<_i6.Exercise?>.value(), ) as _i11.Future<_i6.Exercise?>); @@ -411,40 +595,52 @@ 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, [ + 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, - }), + 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, []), + Invocation.method( + #clearAllCachesAndPrefs, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override _i11.Future fetchAndSetInitialData() => (super.noSuchMethod( - Invocation.method(#fetchAndSetInitialData, []), + Invocation.method( + #fetchAndSetInitialData, + [], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -466,35 +662,50 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { @override _i11.Future updateExerciseCache(_i5.ExerciseDatabase? database) => (super.noSuchMethod( - Invocation.method(#updateExerciseCache, [database]), + 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]), + 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]), + 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]), + 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]), + Invocation.method( + #fetchAndSetEquipments, + [database], + ), returnValue: _i11.Future.value(), returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @@ -509,34 +720,47 @@ class MockExercisesProvider extends _i1.Mock implements _i12.ExercisesProvider { Invocation.method( #searchExercise, [name], - {#languageCode: languageCode, #searchEnglish: searchEnglish}, - ), - returnValue: _i11.Future>.value( - <_i6.Exercise>[], + { + #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]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/routines_screen_test.mocks.dart b/test/workout/routines_screen_test.mocks.dart index da873d63c..0678fcc67 100644 --- a/test/workout/routines_screen_test.mocks.dart +++ b/test/workout/routines_screen_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/routines_screen_test.dart. // Do not manually edit this file. @@ -25,19 +25,43 @@ import 'package:wger/providers/base_provider.dart' as _i4; // ignore_for_file: subtype_of_sealed_class 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]. @@ -51,32 +75,46 @@ 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)), + returnValue: _FakeAuthProvider_0( + this, + Invocation.getter(#auth), + ), ) as _i2.AuthProvider); - @override - set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( - Invocation.setter(#auth, _auth), - returnValueForMissingStub: null, - ); - @override _i3.Client get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeClient_1(this, Invocation.getter(#client)), + returnValue: _FakeClient_1( + this, + Invocation.getter(#client), + ), ) as _i3.Client); + @override + set auth(_i2.AuthProvider? _auth) => super.noSuchMethod( + Invocation.setter( + #auth, + _auth, + ), + returnValueForMissingStub: null, + ); + @override set client(_i3.Client? _client) => super.noSuchMethod( - Invocation.setter(#client, _client), + Invocation.setter( + #client, + _client, + ), returnValueForMissingStub: null, ); @override Map getDefaultHeaders({bool? includeAuth = false}) => (super.noSuchMethod( - Invocation.method(#getDefaultHeaders, [], { - #includeAuth: includeAuth, - }), + Invocation.method( + #getDefaultHeaders, + [], + {#includeAuth: includeAuth}, + ), returnValue: {}, ) as Map); @@ -91,37 +129,58 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), returnValue: _FakeUri_2( this, Invocation.method( #makeUrl, [path], - {#id: id, #objectMethod: objectMethod, #query: query}, + { + #id: id, + #objectMethod: objectMethod, + #query: query, + }, ), ), ) as Uri); @override _i5.Future fetch(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetch, [uri]), + Invocation.method( + #fetch, + [uri], + ), returnValue: _i5.Future.value(), ) as _i5.Future); @override _i5.Future> fetchPaginated(Uri? uri) => (super.noSuchMethod( - Invocation.method(#fetchPaginated, [uri]), + Invocation.method( + #fetchPaginated, + [uri], + ), returnValue: _i5.Future>.value([]), ) as _i5.Future>); @override - _i5.Future> post(Map? data, Uri? uri) => + _i5.Future> post( + Map? data, + Uri? uri, + ) => (super.noSuchMethod( - Invocation.method(#post, [data, uri]), - returnValue: _i5.Future>.value( - {}, + Invocation.method( + #post, + [ + data, + uri, + ], ), + returnValue: _i5.Future>.value({}), ) as _i5.Future>); @override @@ -130,20 +189,38 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider { Uri? uri, ) => (super.noSuchMethod( - Invocation.method(#patch, [data, uri]), - returnValue: _i5.Future>.value( - {}, + 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]), - ), + _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/workout/slot_entry_form_test.mocks.dart b/test/workout/slot_entry_form_test.mocks.dart index 3eb6ed3b0..9dbed8b35 100644 --- a/test/workout/slot_entry_form_test.mocks.dart +++ b/test/workout/slot_entry_form_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/slot_entry_form_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } diff --git a/test/workout/weight_unit_form_widget_test.mocks.dart b/test/workout/weight_unit_form_widget_test.mocks.dart index b84bfb49f..89c64de84 100644 --- a/test/workout/weight_unit_form_widget_test.mocks.dart +++ b/test/workout/weight_unit_form_widget_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in wger/test/workout/weight_unit_form_widget_test.dart. // Do not manually edit this file. @@ -36,46 +36,103 @@ import 'package:wger/providers/routines.dart' as _i12; // ignore_for_file: subtype_of_sealed_class 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]. @@ -107,12 +164,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i3.WeightUnit>[], ) as List<_i3.WeightUnit>); - @override - set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( - Invocation.setter(#weightUnits, weightUnits), - returnValueForMissingStub: null, - ); - @override _i3.WeightUnit get defaultWeightUnit => (super.noSuchMethod( Invocation.getter(#defaultWeightUnit), @@ -128,12 +179,6 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { returnValue: <_i4.RepetitionUnit>[], ) as List<_i4.RepetitionUnit>); - @override - set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( - Invocation.setter(#repetitionUnits, repetitionUnits), - returnValueForMissingStub: null, - ); - @override _i4.RepetitionUnit get defaultRepetitionUnit => (super.noSuchMethod( Invocation.getter(#defaultRepetitionUnit), @@ -144,206 +189,361 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { ) as _i4.RepetitionUnit); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); + set activeRoutine(_i5.Routine? _activeRoutine) => super.noSuchMethod( + Invocation.setter( + #activeRoutine, + _activeRoutine, + ), + returnValueForMissingStub: null, + ); + + @override + set weightUnits(List<_i3.WeightUnit>? weightUnits) => super.noSuchMethod( + Invocation.setter( + #weightUnits, + weightUnits, + ), + returnValueForMissingStub: null, + ); + + @override + set repetitionUnits(List<_i4.RepetitionUnit>? repetitionUnits) => super.noSuchMethod( + Invocation.setter( + #repetitionUnits, + repetitionUnits, + ), + returnValueForMissingStub: null, + ); + + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override void clear() => super.noSuchMethod( - Invocation.method(#clear, []), + Invocation.method( + #clear, + [], + ), returnValueForMissingStub: null, ); @override _i3.WeightUnit findWeightUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), returnValue: _FakeWeightUnit_1( this, - Invocation.method(#findWeightUnitById, [id]), + Invocation.method( + #findWeightUnitById, + [id], + ), ), ) as _i3.WeightUnit); @override _i4.RepetitionUnit findRepetitionUnitById(int? id) => (super.noSuchMethod( - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), returnValue: _FakeRepetitionUnit_2( this, - Invocation.method(#findRepetitionUnitById, [id]), + Invocation.method( + #findRepetitionUnitById, + [id], + ), ), ) as _i4.RepetitionUnit); @override List<_i5.Routine> getPlans() => (super.noSuchMethod( - Invocation.method(#getPlans, []), + Invocation.method( + #getPlans, + [], + ), returnValue: <_i5.Routine>[], ) as List<_i5.Routine>); @override _i5.Routine findById(int? id) => (super.noSuchMethod( - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), returnValue: _FakeRoutine_3( this, - Invocation.method(#findById, [id]), + Invocation.method( + #findById, + [id], + ), ), ) as _i5.Routine); @override int findIndexById(int? id) => (super.noSuchMethod( - Invocation.method(#findIndexById, [id]), + Invocation.method( + #findIndexById, + [id], + ), returnValue: 0, ) as int); @override - void setCurrentPlan(int? id) => super.noSuchMethod( - Invocation.method(#setCurrentPlan, [id]), - returnValueForMissingStub: null, - ); - - @override - void resetCurrentRoutine() => super.noSuchMethod( - Invocation.method(#resetCurrentRoutine, []), + void setActiveRoutine() => super.noSuchMethod( + Invocation.method( + #setActiveRoutine, + [], + ), returnValueForMissingStub: null, ); @override _i13.Future fetchAndSetAllRoutinesFull() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllRoutinesFull, []), + Invocation.method( + #fetchAndSetAllRoutinesFull, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override - _i13.Future fetchAndSetAllPlansSparse() => (super.noSuchMethod( - Invocation.method(#fetchAndSetAllPlansSparse, []), + _i13.Future fetchAndSetAllRoutinesSparse() => (super.noSuchMethod( + Invocation.method( + #fetchAndSetAllRoutinesSparse, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future setExercisesAndUnits(List<_i14.DayData>? entries) => (super.noSuchMethod( - Invocation.method(#setExercisesAndUnits, [entries]), + Invocation.method( + #setExercisesAndUnits, + [entries], + ), 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]), - ), + 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]), - ), + 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])), + 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]), + 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]), + Invocation.method( + #deleteRoutine, + [id], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetRepetitionUnits, []), + Invocation.method( + #fetchAndSetRepetitionUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetWeightUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetWeightUnits, []), + Invocation.method( + #fetchAndSetWeightUnits, + [], + ), returnValue: _i13.Future.value(), returnValueForMissingStub: _i13.Future.value(), ) as _i13.Future); @override _i13.Future fetchAndSetUnits() => (super.noSuchMethod( - Invocation.method(#fetchAndSetUnits, []), + 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])), + 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]), + 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]), + 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]), + 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) => (super.noSuchMethod( - Invocation.method(#addSlot, [slot, routineId]), - returnValue: _i13.Future<_i7.Slot>.value( - _FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])), + _i13.Future<_i7.Slot> addSlot( + _i7.Slot? slot, + int? routineId, + ) => + (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>); @override - _i13.Future deleteSlot(int? slotId, int? routineId) => (super.noSuchMethod( - Invocation.method(#deleteSlot, [slotId, routineId]), + _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]), + _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]), + _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); @@ -354,35 +554,71 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSlotEntry, [entry, routineId]), - returnValue: _i13.Future<_i8.SlotEntry>.value( - _FakeSlotEntry_6( - this, - Invocation.method(#addSlotEntry, [entry, routineId]), - ), + 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]), + _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]), + _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]), + Invocation.method( + #getConfigUrl, + [type], + ), returnValue: _i15.dummyValue( this, - Invocation.method(#getConfigUrl, [type]), + Invocation.method( + #getConfigUrl, + [type], + ), ), ) as String); @@ -392,13 +628,23 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#editConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#editConfig, [config, type]), - ), + 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 @@ -407,18 +653,38 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#addConfig, [config, type]), - returnValue: _i13.Future<_i9.BaseConfig>.value( - _FakeBaseConfig_7( - this, - Invocation.method(#addConfig, [config, type]), - ), + 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]), + _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); @@ -430,17 +696,25 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { _i8.ConfigType? type, ) => (super.noSuchMethod( - Invocation.method(#handleConfig, [entry, input, type]), + Invocation.method( + #handleConfig, + [ + entry, + input, + 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>[], + Invocation.method( + #fetchSessionData, + [], ), + returnValue: _i13.Future>.value(<_i10.WorkoutSession>[]), ) as _i13.Future>); @override @@ -449,62 +723,105 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider { int? routineId, ) => (super.noSuchMethod( - Invocation.method(#addSession, [session, routineId]), - returnValue: _i13.Future<_i10.WorkoutSession>.value( - _FakeWorkoutSession_8( - this, - Invocation.method(#addSession, [session, routineId]), - ), + 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]), - ), + 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])), + 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]), + _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(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#addListener, [listener]), + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( - Invocation.method(#removeListener, [listener]), + Invocation.method( + #removeListener, + [listener], + ), returnValueForMissingStub: null, ); @override void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + Invocation.method( + #dispose, + [], + ), returnValueForMissingStub: null, ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method(#notifyListeners, []), + Invocation.method( + #notifyListeners, + [], + ), returnValueForMissingStub: null, ); } From f14fd9039b18faeb41d193aafce5f0c9f06dc76a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 00:09:14 +0000 Subject: [PATCH 2/4] Bump drift_dev from 2.26.0 to 2.26.1 Bumps [drift_dev](https://github.com/simolus3/drift) from 2.26.0 to 2.26.1. - [Release notes](https://github.com/simolus3/drift/releases) - [Commits](https://github.com/simolus3/drift/compare/drift_dev-2.26.0...drift_dev-2.26.1) --- updated-dependencies: - dependency-name: drift_dev dependency-version: 2.26.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index fd1d17d67..6df582d64 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -293,10 +293,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: "0d3f8b33b76cf1c6a82ee34d9511c40957549c4674b8f1688609e6d6c7306588" + sha256: "54dc207c6e4662741f60e5752678df183957ab907754ffab0372a7082f6d2816" url: "https://pub.dev" source: hosted - version: "2.26.0" + version: "2.26.1" equatable: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 0165f771d..f755323f9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -79,7 +79,7 @@ dev_dependencies: sdk: flutter build_runner: ^2.4.15 cider: ^0.2.7 - drift_dev: ^2.26.0 + drift_dev: ^2.26.1 flutter_lints: ^5.0.0 freezed: ^3.0.6 json_serializable: ^6.9.5 From 9e4cfc9797292fd466910008751eeda6928afb4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 00:09:10 +0000 Subject: [PATCH 3/4] Bump drift from 2.26.0 to 2.26.1 Bumps [drift](https://github.com/simolus3/drift) from 2.26.0 to 2.26.1. - [Release notes](https://github.com/simolus3/drift/releases) - [Commits](https://github.com/simolus3/drift/compare/drift-2.26.0...drift-2.26.1) --- updated-dependencies: - dependency-name: drift dependency-version: 2.26.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 6df582d64..235f6f105 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -285,10 +285,10 @@ packages: dependency: "direct main" description: name: drift - sha256: "14a61af39d4584faf1d73b5b35e4b758a43008cf4c0fdb0576ec8e7032c0d9a5" + sha256: b584ddeb2b74436735dd2cf746d2d021e19a9a6770f409212fd5cbc2814ada85 url: "https://pub.dev" source: hosted - version: "2.26.0" + version: "2.26.1" drift_dev: dependency: "direct dev" description: diff --git a/pubspec.yaml b/pubspec.yaml index f755323f9..74130ec52 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: clock: ^1.1.2 collection: ^1.18.0 cupertino_icons: ^1.0.8 - drift: ^2.26.0 + drift: ^2.26.1 equatable: ^2.0.7 fl_chart: ^0.69.2 flex_color_scheme: ^8.1.1 From b98cc9b33a42f29a28ded3267eedc2241deef027 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 00:09:03 +0000 Subject: [PATCH 4/4] Bump provider from 6.1.4 to 6.1.5 Bumps [provider](https://github.com/rrousselGit/provider) from 6.1.4 to 6.1.5. - [Commits](https://github.com/rrousselGit/provider/compare/provider-v6.1.4...provider-v6.1.5) --- updated-dependencies: - dependency-name: provider dependency-version: 6.1.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 235f6f105..d7bed495c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1048,10 +1048,10 @@ packages: dependency: "direct main" description: name: provider - sha256: "489024f942069c2920c844ee18bb3d467c69e48955a4f32d1677f71be103e310" + sha256: "4abbd070a04e9ddc287673bf5a030c7ca8b685ff70218720abab8b092f53dd84" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "6.1.5" pub_semver: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 74130ec52..cae4470f5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -58,7 +58,7 @@ dependencies: package_info_plus: ^8.3.0 path: ^1.9.0 path_provider: ^2.1.5 - provider: ^6.1.4 + provider: ^6.1.5 rive: ^0.13.20 shared_preferences: ^2.5.3 sqlite3_flutter_libs: ^0.5.31