Moved Provider to the highest

main
Kai Mannweiler 2023-03-03 16:37:08 +01:00
parent 0596194ad0
commit 37a63b0059
1 changed files with 18 additions and 18 deletions

View File

@ -28,9 +28,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
TimerProvider timerProvider = TimerProvider();
return MaterialApp(
title: _title,
home: MultiProvider(
return MultiProvider(
providers: [
ChangeNotifierProvider(create: (context) => SettingsProvider()),
ChangeNotifierProxyProvider<SettingsProvider, TasksProvider>(
@ -45,7 +43,9 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider(
create: (context) => WorkoutProvider(timerProvider)),
],
child: const MyHomePage(),
child: const MaterialApp(
title: _title,
home: MyHomePage(),
));
}
}