diff --git a/integration_test/1_dashboard.dart b/integration_test/1_dashboard.dart index a7a8d442..b59a7be6 100644 --- a/integration_test/1_dashboard.dart +++ b/integration_test/1_dashboard.dart @@ -79,7 +79,7 @@ Widget createDashboardScreen({locale = 'en'}) { localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, theme: wgerLightTheme, - home: DashboardScreen(), + home: const DashboardScreen(), ), ); } diff --git a/integration_test/2_workout.dart b/integration_test/2_workout.dart index ede8fe71..96bad963 100644 --- a/integration_test/2_workout.dart +++ b/integration_test/2_workout.dart @@ -35,7 +35,7 @@ Widget createWorkoutDetailScreen({locale = 'en'}) { onPressed: () => key.currentState!.push( MaterialPageRoute( settings: RouteSettings(arguments: workout), - builder: (_) => WorkoutPlanScreen(), + builder: (_) => const WorkoutPlanScreen(), ), ), child: const SizedBox(), diff --git a/integration_test/3_gym_mode.dart b/integration_test/3_gym_mode.dart index 88b50fbe..202b7c29 100644 --- a/integration_test/3_gym_mode.dart +++ b/integration_test/3_gym_mode.dart @@ -44,13 +44,13 @@ Widget createGymModeScreen({locale = 'en'}) { onPressed: () => key.currentState!.push( MaterialPageRoute( settings: RouteSettings(arguments: workout.days.first), - builder: (_) => GymModeScreen(), + builder: (_) => const GymModeScreen(), ), ), child: const SizedBox(), ), routes: { - WorkoutPlanScreen.routeName: (ctx) => WorkoutPlanScreen(), + WorkoutPlanScreen.routeName: (ctx) => const WorkoutPlanScreen(), }, ), ), diff --git a/integration_test/4_measurements.dart b/integration_test/4_measurements.dart index 668618ef..8db33ba0 100644 --- a/integration_test/4_measurements.dart +++ b/integration_test/4_measurements.dart @@ -25,7 +25,7 @@ Widget createMeasurementScreen({locale = 'en'}) { localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, theme: wgerLightTheme, - home: MeasurementCategoriesScreen(), + home: const MeasurementCategoriesScreen(), ), ); } diff --git a/integration_test/5_nutritional_plan.dart b/integration_test/5_nutritional_plan.dart index 9277cb70..b43965a1 100644 --- a/integration_test/5_nutritional_plan.dart +++ b/integration_test/5_nutritional_plan.dart @@ -34,7 +34,7 @@ Widget createNutritionalPlanScreen({locale = 'en'}) { onPressed: () => key.currentState!.push( MaterialPageRoute( settings: RouteSettings(arguments: getNutritionalPlanScreenshot()), - builder: (_) => NutritionalPlanScreen(), + builder: (_) => const NutritionalPlanScreen(), ), ), child: const SizedBox(), diff --git a/integration_test/6_weight.dart b/integration_test/6_weight.dart index d8ca8989..6da0995d 100644 --- a/integration_test/6_weight.dart +++ b/integration_test/6_weight.dart @@ -35,9 +35,9 @@ Widget createWeightScreen({locale = 'en'}) { localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, theme: wgerLightTheme, - home: WeightScreen(), + home: const WeightScreen(), routes: { - FormScreen.routeName: (ctx) => FormScreen(), + FormScreen.routeName: (ctx) => const FormScreen(), }, ), ); diff --git a/lib/core/locator.dart b/lib/core/locator.dart index 29a0b15a..76486008 100644 --- a/lib/core/locator.dart +++ b/lib/core/locator.dart @@ -13,7 +13,7 @@ class ServiceLocator { const ServiceLocator._internal(); - static final ServiceLocator _singleton = ServiceLocator._internal(); + static const ServiceLocator _singleton = ServiceLocator._internal(); Future _initDB() async { ExerciseDatabase exerciseDB; diff --git a/lib/main.dart b/lib/main.dart index 64b51069..ac4abfe1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -64,7 +64,7 @@ void main() async { // Locator to initialize exerciseDB await ServiceLocator().configure(); // Application - runApp(MyApp()); + runApp(const MyApp()); } class MyApp extends StatelessWidget { @@ -142,30 +142,30 @@ class MyApp extends StatelessWidget { highContrastDarkTheme: wgerDarkThemeHc, themeMode: ThemeMode.system, home: auth.isAuth - ? HomeTabsScreen() + ? const HomeTabsScreen() : FutureBuilder( future: auth.tryAutoLogin(), builder: (ctx, authResultSnapshot) => authResultSnapshot.connectionState == ConnectionState.waiting - ? SplashScreen() - : AuthScreen(), + ? const SplashScreen() + : const AuthScreen(), ), routes: { - DashboardScreen.routeName: (ctx) => DashboardScreen(), - FormScreen.routeName: (ctx) => FormScreen(), + DashboardScreen.routeName: (ctx) => const DashboardScreen(), + FormScreen.routeName: (ctx) => const FormScreen(), GalleryScreen.routeName: (ctx) => const GalleryScreen(), - GymModeScreen.routeName: (ctx) => GymModeScreen(), - HomeTabsScreen.routeName: (ctx) => HomeTabsScreen(), - MeasurementCategoriesScreen.routeName: (ctx) => MeasurementCategoriesScreen(), - MeasurementEntriesScreen.routeName: (ctx) => MeasurementEntriesScreen(), - NutritionalPlansScreen.routeName: (ctx) => NutritionalPlansScreen(), - NutritionalDiaryScreen.routeName: (ctx) => NutritionalDiaryScreen(), - NutritionalPlanScreen.routeName: (ctx) => NutritionalPlanScreen(), - LogMealsScreen.routeName: (ctx) => LogMealsScreen(), - LogMealScreen.routeName: (ctx) => LogMealScreen(), - WeightScreen.routeName: (ctx) => WeightScreen(), - WorkoutPlanScreen.routeName: (ctx) => WorkoutPlanScreen(), - WorkoutPlansScreen.routeName: (ctx) => WorkoutPlansScreen(), + GymModeScreen.routeName: (ctx) => const GymModeScreen(), + HomeTabsScreen.routeName: (ctx) => const HomeTabsScreen(), + MeasurementCategoriesScreen.routeName: (ctx) => const MeasurementCategoriesScreen(), + MeasurementEntriesScreen.routeName: (ctx) => const MeasurementEntriesScreen(), + NutritionalPlansScreen.routeName: (ctx) => const NutritionalPlansScreen(), + NutritionalDiaryScreen.routeName: (ctx) => const NutritionalDiaryScreen(), + NutritionalPlanScreen.routeName: (ctx) => const NutritionalPlanScreen(), + LogMealsScreen.routeName: (ctx) => const LogMealsScreen(), + LogMealScreen.routeName: (ctx) => const LogMealScreen(), + WeightScreen.routeName: (ctx) => const WeightScreen(), + WorkoutPlanScreen.routeName: (ctx) => const WorkoutPlanScreen(), + WorkoutPlansScreen.routeName: (ctx) => const WorkoutPlansScreen(), ExercisesScreen.routeName: (ctx) => const ExercisesScreen(), ExerciseDetailScreen.routeName: (ctx) => const ExerciseDetailScreen(), AddExerciseScreen.routeName: (ctx) => const AddExerciseScreen(), diff --git a/lib/models/measurements/measurement_category.dart b/lib/models/measurements/measurement_category.dart index fc873f29..d32925db 100644 --- a/lib/models/measurements/measurement_category.dart +++ b/lib/models/measurements/measurement_category.dart @@ -43,7 +43,7 @@ class MeasurementCategory extends Equatable { MeasurementEntry findEntryById(entryId) { return entries.firstWhere( (entry) => entry.id == entryId, - orElse: () => throw NoSuchEntryException(), + orElse: () => throw const NoSuchEntryException(), ); } diff --git a/lib/providers/exercises.dart b/lib/providers/exercises.dart index bd7ff810..0431846a 100644 --- a/lib/providers/exercises.dart +++ b/lib/providers/exercises.dart @@ -182,7 +182,7 @@ class ExercisesProvider with ChangeNotifier { Exercise findExerciseById(int id) { return exercises.firstWhere( (base) => base.id == id, - orElse: () => throw NoSuchEntryException(), + orElse: () => throw const NoSuchEntryException(), ); } @@ -208,7 +208,7 @@ class ExercisesProvider with ChangeNotifier { ExerciseCategory findCategoryById(int id) { return _categories.firstWhere( (cat) => cat.id == id, - orElse: () => throw NoSuchEntryException(), + orElse: () => throw const NoSuchEntryException(), ); } @@ -216,7 +216,7 @@ class ExercisesProvider with ChangeNotifier { Equipment findEquipmentById(int id) { return _equipment.firstWhere( (equipment) => equipment.id == id, - orElse: () => throw NoSuchEntryException(), + orElse: () => throw const NoSuchEntryException(), ); } @@ -224,7 +224,7 @@ class ExercisesProvider with ChangeNotifier { Muscle findMuscleById(int id) { return _muscles.firstWhere( (muscle) => muscle.id == id, - orElse: () => throw NoSuchEntryException(), + orElse: () => throw const NoSuchEntryException(), ); } @@ -232,7 +232,7 @@ class ExercisesProvider with ChangeNotifier { Language findLanguageById(int id) { return _languages.firstWhere( (language) => language.id == id, - orElse: () => throw NoSuchEntryException(), + orElse: () => throw const NoSuchEntryException(), ); } diff --git a/lib/providers/measurement.dart b/lib/providers/measurement.dart index 7f2c4ee3..de9d9bcf 100644 --- a/lib/providers/measurement.dart +++ b/lib/providers/measurement.dart @@ -44,7 +44,7 @@ class MeasurementProvider with ChangeNotifier { MeasurementCategory findCategoryById(int id) { return _categories.firstWhere( (category) => category.id == id, - orElse: () => throw NoSuchEntryException(), + orElse: () => throw const NoSuchEntryException(), ); } diff --git a/lib/providers/nutrition.dart b/lib/providers/nutrition.dart index 8d5f26bb..a3b3642d 100644 --- a/lib/providers/nutrition.dart +++ b/lib/providers/nutrition.dart @@ -75,7 +75,7 @@ class NutritionPlansProvider with ChangeNotifier { NutritionalPlan findById(int id) { return _plans.firstWhere( (plan) => plan.id == id, - orElse: () => throw NoSuchEntryException(), + orElse: () => throw const NoSuchEntryException(), ); } diff --git a/lib/screens/auth_screen.dart b/lib/screens/auth_screen.dart index b877ef77..ab096576 100644 --- a/lib/screens/auth_screen.dart +++ b/lib/screens/auth_screen.dart @@ -211,7 +211,7 @@ class _AuthCardState extends State { if (res.containsKey('action')) { if (res['action'] == LoginActions.update && mounted) { Navigator.of(context).push( - MaterialPageRoute(builder: (context) => UpdateAppScreen()), + MaterialPageRoute(builder: (context) => const UpdateAppScreen()), ); return; } diff --git a/lib/screens/dashboard.dart b/lib/screens/dashboard.dart index 154d4df3..02d524f3 100644 --- a/lib/screens/dashboard.dart +++ b/lib/screens/dashboard.dart @@ -35,15 +35,15 @@ class _DashboardScreenState extends State { Widget build(BuildContext context) { return Scaffold( appBar: MainAppBar(AppLocalizations.of(context).labelDashboard), - body: SingleChildScrollView( - padding: const EdgeInsets.all(10), + body: const SingleChildScrollView( + padding: EdgeInsets.all(10), child: Column( children: [ DashboardWorkoutWidget(), DashboardNutritionWidget(), DashboardWeightWidget(), DashboardMeasurementWidget(), - const DashboardCalendarWidget(), + DashboardCalendarWidget(), ], ), ), diff --git a/lib/screens/home_tabs_screen.dart b/lib/screens/home_tabs_screen.dart index d8c124ab..9a4c3f25 100644 --- a/lib/screens/home_tabs_screen.dart +++ b/lib/screens/home_tabs_screen.dart @@ -63,10 +63,10 @@ class _HomeTabsScreenState extends State with SingleTickerProvid } final _screenList = [ - DashboardScreen(), - WorkoutPlansScreen(), - NutritionalPlansScreen(), - WeightScreen(), + const DashboardScreen(), + const WorkoutPlansScreen(), + const NutritionalPlansScreen(), + const WeightScreen(), const GalleryScreen(), ]; diff --git a/lib/screens/measurement_categories_screen.dart b/lib/screens/measurement_categories_screen.dart index d154205a..6bc5e1b1 100644 --- a/lib/screens/measurement_categories_screen.dart +++ b/lib/screens/measurement_categories_screen.dart @@ -46,7 +46,7 @@ class MeasurementCategoriesScreen extends StatelessWidget { }, ), body: Consumer( - builder: (context, provider, child) => CategoriesList(), + builder: (context, provider, child) => const CategoriesList(), ), ); } diff --git a/lib/screens/weight_screen.dart b/lib/screens/weight_screen.dart index f7d115aa..ee0dc429 100644 --- a/lib/screens/weight_screen.dart +++ b/lib/screens/weight_screen.dart @@ -49,7 +49,7 @@ class WeightScreen extends StatelessWidget { }, ), body: Consumer( - builder: (context, workoutProvider, child) => WeightEntriesList(), + builder: (context, workoutProvider, child) => const WeightEntriesList(), ), ); } diff --git a/lib/screens/workout_plans_screen.dart b/lib/screens/workout_plans_screen.dart index 15bc0cb0..7f2490e9 100644 --- a/lib/screens/workout_plans_screen.dart +++ b/lib/screens/workout_plans_screen.dart @@ -33,7 +33,7 @@ class WorkoutPlansScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: WorkoutOverviewAppBar(), + appBar: const WorkoutOverviewAppBar(), floatingActionButton: FloatingActionButton( onPressed: () { Navigator.pushNamed( diff --git a/lib/widgets/gallery/overview.dart b/lib/widgets/gallery/overview.dart index 16862f12..0301b2c9 100644 --- a/lib/widgets/gallery/overview.dart +++ b/lib/widgets/gallery/overview.dart @@ -40,7 +40,7 @@ class Gallery extends StatelessWidget { child: RefreshIndicator( onRefresh: () => provider.fetchAndSetGallery(), child: provider.images.isEmpty - ? TextPrompt() + ? const TextPrompt() : MasonryGridView.count( crossAxisCount: 2, mainAxisSpacing: 5, diff --git a/lib/widgets/nutrition/nutritional_plans_list.dart b/lib/widgets/nutrition/nutritional_plans_list.dart index 9ddbd86f..d1a6a48e 100644 --- a/lib/widgets/nutrition/nutritional_plans_list.dart +++ b/lib/widgets/nutrition/nutritional_plans_list.dart @@ -33,7 +33,7 @@ class NutritionalPlansList extends StatelessWidget { return RefreshIndicator( onRefresh: () => _nutritionProvider.fetchAndSetAllPlansSparse(), child: _nutritionProvider.items.isEmpty - ? TextPrompt() + ? const TextPrompt() : ListView.builder( padding: const EdgeInsets.all(10.0), itemCount: _nutritionProvider.items.length, diff --git a/lib/widgets/nutrition/widgets.dart b/lib/widgets/nutrition/widgets.dart index d6c37e64..0ee46fc5 100644 --- a/lib/widgets/nutrition/widgets.dart +++ b/lib/widgets/nutrition/widgets.dart @@ -92,7 +92,7 @@ class _IngredientTypeaheadState extends State { Future readerscan(BuildContext context) async { try { final code = await Navigator.of(context) - .push(MaterialPageRoute(builder: (context) => ScanReader())); + .push(MaterialPageRoute(builder: (context) => const ScanReader())); if (code == null) { return ''; } diff --git a/lib/widgets/workouts/workout_plans_list.dart b/lib/widgets/workouts/workout_plans_list.dart index cc5c6366..14112ab1 100644 --- a/lib/widgets/workouts/workout_plans_list.dart +++ b/lib/widgets/workouts/workout_plans_list.dart @@ -34,7 +34,7 @@ class WorkoutPlansList extends StatelessWidget { return RefreshIndicator( onRefresh: () => _workoutProvider.fetchAndSetAllPlansSparse(), child: _workoutProvider.items.isEmpty - ? TextPrompt() + ? const TextPrompt() : ListView.builder( padding: const EdgeInsets.all(10.0), itemCount: _workoutProvider.items.length, diff --git a/test/auth/auth_screen_test.dart b/test/auth/auth_screen_test.dart index 565da38b..a8abf247 100644 --- a/test/auth/auth_screen_test.dart +++ b/test/auth/auth_screen_test.dart @@ -63,10 +63,10 @@ void main() { ChangeNotifierProvider(create: (ctx) => authProvider), ], child: Consumer( - builder: (ctx, auth, _) => MaterialApp( + builder: (ctx, auth, _) => const MaterialApp( localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, - locale: const Locale('en'), + locale: Locale('en'), home: AuthScreen(), ), ), diff --git a/test/gallery/gallery_screen_test.dart b/test/gallery/gallery_screen_test.dart index 43e90b3f..848aeeb9 100644 --- a/test/gallery/gallery_screen_test.dart +++ b/test/gallery/gallery_screen_test.dart @@ -49,7 +49,7 @@ void main() { supportedLocales: AppLocalizations.supportedLocales, home: const Gallery(), routes: { - FormScreen.routeName: (ctx) => FormScreen(), + FormScreen.routeName: (ctx) => const FormScreen(), }, ), ); diff --git a/test/measurements/measurement_categories_screen_test.dart b/test/measurements/measurement_categories_screen_test.dart index 1fa899e4..75d8ad18 100644 --- a/test/measurements/measurement_categories_screen_test.dart +++ b/test/measurements/measurement_categories_screen_test.dart @@ -55,7 +55,7 @@ void main() { locale: Locale(locale), localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, - home: MeasurementCategoriesScreen(), + home: const MeasurementCategoriesScreen(), ), ); } diff --git a/test/measurements/measurement_entries_screen_test.dart b/test/measurements/measurement_entries_screen_test.dart index 20b9b5dc..9395bb4f 100644 --- a/test/measurements/measurement_entries_screen_test.dart +++ b/test/measurements/measurement_entries_screen_test.dart @@ -55,7 +55,7 @@ void main() { onPressed: () => key.currentState!.push( MaterialPageRoute( settings: const RouteSettings(arguments: 1), - builder: (_) => MeasurementEntriesScreen(), + builder: (_) => const MeasurementEntriesScreen(), ), ), child: Container(), diff --git a/test/nutrition/nutritional_meal_form_test.dart b/test/nutrition/nutritional_meal_form_test.dart index bd84eef8..8d25f6c0 100644 --- a/test/nutrition/nutritional_meal_form_test.dart +++ b/test/nutrition/nutritional_meal_form_test.dart @@ -64,7 +64,7 @@ void main() { body: MealForm(1, meal), ), routes: { - NutritionalPlanScreen.routeName: (ctx) => NutritionalPlanScreen(), + NutritionalPlanScreen.routeName: (ctx) => const NutritionalPlanScreen(), }, ), ); diff --git a/test/nutrition/nutritional_meal_item_form_test.dart b/test/nutrition/nutritional_meal_item_form_test.dart index 72c03594..2ed57b98 100644 --- a/test/nutrition/nutritional_meal_item_form_test.dart +++ b/test/nutrition/nutritional_meal_item_form_test.dart @@ -105,7 +105,7 @@ void main() { ), ), routes: { - NutritionalPlanScreen.routeName: (ctx) => NutritionalPlanScreen(), + NutritionalPlanScreen.routeName: (ctx) => const NutritionalPlanScreen(), }, ), ); diff --git a/test/nutrition/nutritional_plan_form_test.dart b/test/nutrition/nutritional_plan_form_test.dart index 059f1637..0eb990fc 100644 --- a/test/nutrition/nutritional_plan_form_test.dart +++ b/test/nutrition/nutritional_plan_form_test.dart @@ -62,7 +62,7 @@ void main() { body: PlanForm(plan), ), routes: { - NutritionalPlanScreen.routeName: (ctx) => NutritionalPlanScreen(), + NutritionalPlanScreen.routeName: (ctx) => const NutritionalPlanScreen(), }, ), ); diff --git a/test/nutrition/nutritional_plan_screen_test.dart b/test/nutrition/nutritional_plan_screen_test.dart index 8a884bc0..563ac86f 100644 --- a/test/nutrition/nutritional_plan_screen_test.dart +++ b/test/nutrition/nutritional_plan_screen_test.dart @@ -57,7 +57,7 @@ void main() { onPressed: () => key.currentState!.push( MaterialPageRoute( settings: RouteSettings(arguments: plan), - builder: (_) => NutritionalPlanScreen(), + builder: (_) => const NutritionalPlanScreen(), ), ), child: const SizedBox(), diff --git a/test/nutrition/nutritional_plans_screen_test.dart b/test/nutrition/nutritional_plans_screen_test.dart index 61d7da76..697f4d21 100644 --- a/test/nutrition/nutritional_plans_screen_test.dart +++ b/test/nutrition/nutritional_plans_screen_test.dart @@ -73,9 +73,9 @@ void main() { locale: Locale(locale), localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, - home: NutritionalPlansScreen(), + home: const NutritionalPlansScreen(), routes: { - FormScreen.routeName: (ctx) => FormScreen(), + FormScreen.routeName: (ctx) => const FormScreen(), }, ), ); diff --git a/test/weight/weight_screen_test.dart b/test/weight/weight_screen_test.dart index 27a062bb..00e73c19 100644 --- a/test/weight/weight_screen_test.dart +++ b/test/weight/weight_screen_test.dart @@ -56,9 +56,9 @@ void main() { locale: Locale(locale), localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, - home: WeightScreen(), + home: const WeightScreen(), routes: { - FormScreen.routeName: (_) => FormScreen(), + FormScreen.routeName: (_) => const FormScreen(), }, ), ), diff --git a/test/workout/gym_mode_screen_test.dart b/test/workout/gym_mode_screen_test.dart index db0ccfe9..5175ef8d 100644 --- a/test/workout/gym_mode_screen_test.dart +++ b/test/workout/gym_mode_screen_test.dart @@ -61,13 +61,13 @@ void main() { onPressed: () => key.currentState!.push( MaterialPageRoute( settings: RouteSettings(arguments: workoutPlan.days.first), - builder: (_) => GymModeScreen(), + builder: (_) => const GymModeScreen(), ), ), child: const SizedBox(), ), routes: { - WorkoutPlanScreen.routeName: (ctx) => WorkoutPlanScreen(), + WorkoutPlanScreen.routeName: (ctx) => const WorkoutPlanScreen(), }, ), ), diff --git a/test/workout/repetition_unit_form_widget_test.dart b/test/workout/repetition_unit_form_widget_test.dart index f613a629..5e250bd7 100644 --- a/test/workout/repetition_unit_form_widget_test.dart +++ b/test/workout/repetition_unit_form_widget_test.dart @@ -68,7 +68,7 @@ void main() { body: RepetitionUnitInputWidget(setting1), ), routes: { - WorkoutPlanScreen.routeName: (ctx) => WorkoutPlanScreen(), + WorkoutPlanScreen.routeName: (ctx) => const WorkoutPlanScreen(), }, ), ); diff --git a/test/workout/weight_unit_form_widget_test.dart b/test/workout/weight_unit_form_widget_test.dart index 8e3d93f0..4b564383 100644 --- a/test/workout/weight_unit_form_widget_test.dart +++ b/test/workout/weight_unit_form_widget_test.dart @@ -69,7 +69,7 @@ void main() { body: WeightUnitInputWidget(setting1), ), routes: { - WorkoutPlanScreen.routeName: (ctx) => WorkoutPlanScreen(), + WorkoutPlanScreen.routeName: (ctx) => const WorkoutPlanScreen(), }, ), ); diff --git a/test/workout/workout_form_test.dart b/test/workout/workout_form_test.dart index 44f72b28..75af21b4 100644 --- a/test/workout/workout_form_test.dart +++ b/test/workout/workout_form_test.dart @@ -63,7 +63,7 @@ void main() { body: WorkoutForm(workoutPlan), ), routes: { - WorkoutPlanScreen.routeName: (ctx) => WorkoutPlanScreen(), + WorkoutPlanScreen.routeName: (ctx) => const WorkoutPlanScreen(), }, ), ); diff --git a/test/workout/workout_plan_screen_test.dart b/test/workout/workout_plan_screen_test.dart index bc06df44..b3bad988 100644 --- a/test/workout/workout_plan_screen_test.dart +++ b/test/workout/workout_plan_screen_test.dart @@ -52,13 +52,13 @@ void main() { onPressed: () => key.currentState!.push( MaterialPageRoute( settings: RouteSettings(arguments: getWorkout()), - builder: (_) => WorkoutPlanScreen(), + builder: (_) => const WorkoutPlanScreen(), ), ), child: const SizedBox(), ), routes: { - WorkoutPlanScreen.routeName: (ctx) => WorkoutPlanScreen(), + WorkoutPlanScreen.routeName: (ctx) => const WorkoutPlanScreen(), }, ), ); diff --git a/test/workout/workout_plans_screen_test.dart b/test/workout/workout_plans_screen_test.dart index 621c8208..993eb9a6 100644 --- a/test/workout/workout_plans_screen_test.dart +++ b/test/workout/workout_plans_screen_test.dart @@ -70,9 +70,9 @@ void main() { locale: Locale(locale), localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, - home: WorkoutPlansScreen(), + home: const WorkoutPlansScreen(), routes: { - FormScreen.routeName: (ctx) => FormScreen(), + FormScreen.routeName: (ctx) => const FormScreen(), }, ), );