Assertion failed
miamadi opened this issue · comments
Assertion failed: file:///C:/Users/User/flutter/packages/flutter/lib/src/widgets/navigator.dart:5307:12
!_debugLocked
is not true
Does anyone know why this happens?
I did all the steps right but still it crashes after it loads.
WidgetsBinding.instance?.addPostFrameCallback((_) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) {
return LocationScreen(locationWeather: weatherData);
},
),
);
});
Try this, It works for me.