Moved Provider to the highest
parent
0596194ad0
commit
37a63b0059
|
@ -28,9 +28,7 @@ class MyApp extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
TimerProvider timerProvider = TimerProvider();
|
TimerProvider timerProvider = TimerProvider();
|
||||||
return MaterialApp(
|
return MultiProvider(
|
||||||
title: _title,
|
|
||||||
home: MultiProvider(
|
|
||||||
providers: [
|
providers: [
|
||||||
ChangeNotifierProvider(create: (context) => SettingsProvider()),
|
ChangeNotifierProvider(create: (context) => SettingsProvider()),
|
||||||
ChangeNotifierProxyProvider<SettingsProvider, TasksProvider>(
|
ChangeNotifierProxyProvider<SettingsProvider, TasksProvider>(
|
||||||
|
@ -45,7 +43,9 @@ class MyApp extends StatelessWidget {
|
||||||
ChangeNotifierProvider(
|
ChangeNotifierProvider(
|
||||||
create: (context) => WorkoutProvider(timerProvider)),
|
create: (context) => WorkoutProvider(timerProvider)),
|
||||||
],
|
],
|
||||||
child: const MyHomePage(),
|
child: const MaterialApp(
|
||||||
|
title: _title,
|
||||||
|
home: MyHomePage(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue