File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed
Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,8 @@ class _AccelerometerScreenState extends State<AccelerometerScreen> {
135135 Navigator .push (
136136 context,
137137 MaterialPageRoute (
138- builder: (context) => ChangeNotifierProvider (
139- create : (context) => _configProvider,
138+ builder: (context) => ChangeNotifierProvider . value (
139+ value : _configProvider,
140140 child: const AccelerometerConfigScreen (),
141141 ),
142142 ),
Original file line number Diff line number Diff line change @@ -134,13 +134,14 @@ class _GyroscopeScreenState extends State<GyroscopeScreen> {
134134
135135 void _navigateToConfig () {
136136 Navigator .push (
137- context,
138- MaterialPageRoute (
139- builder: (context) => ChangeNotifierProvider (
140- create: (context) => _configProvider,
141- child: const GyroscopeConfigScreen (),
142- ),
143- ));
137+ context,
138+ MaterialPageRoute (
139+ builder: (context) => ChangeNotifierProvider .value (
140+ value: _configProvider,
141+ child: const GyroscopeConfigScreen (),
142+ ),
143+ ),
144+ );
144145 }
145146
146147 Future <void > _toggleRecording () async {
Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ class _SoundMeterScreenState extends State<SoundMeterScreen> {
9595 Navigator .push (
9696 context,
9797 MaterialPageRoute (
98- builder: (context) => ChangeNotifierProvider (
99- create : (context) => _configProvider,
98+ builder: (context) => ChangeNotifierProvider . value (
99+ value : _configProvider,
100100 child: const SoundMeterConfigScreen (),
101101 ),
102102 ),
You can’t perform that action at this time.
0 commit comments