New version of flutter giving bunch of errors in my previous code


I have set my development environment on another system with everything new. Latest android studio version, flutter, and everything.

Now I am trying to run my previous code but the whole code is full of errors. The code was working perfectly fine on my previous version of flutter. I didn’t get the issue with this new version.

Here is the screenshot of my code:


Anyone please help me to solve this issue. This is my whole project with some other code as well and there are nearly 70 files of code.
I would be thankful if anyone can help me with this issue.


Well, you semed to have had a really, really old version of Flutter (and Dart) before.

One way to fix those errors is to read and understand the guide to null safety and modify your project. It will be better after you do it, null safety is an amazing feature.

If you don’t have the time to do that right now, you should be able to just constrain your SDK to an earlier version. Quite frankly I’m surprised that you got null safety out of the box because your project should have had constraints. If you set the minimum SDK version to something smaller than 2.12 you should be running without that feature. But please note that sooner or later you will need to enable it, you cannot stay on an obsolete version. So maybe it’s time to do that now.

Answered By – nvoigt

Answer Checked By – Senaida (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.