londonappbrewery / Clima-Flutter-Completed

The completed code for the Clima Project - The Complete Flutter Development Bootcamp

Home Page:https://www.appbrewery.co/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.