I am a beginner in Flutter and Dart.
Recently, I was introduced in a new project : restore a 3 years old flutter project. No commits have been made for 3 years
All dependancies are in an old obsolete version (no one has been null safety
) – or deprecated -, Flutter and the Dart SDK are update since 3 years.
My problem : How I can “upgrade” this project correctly ? Is there a good way/method to “migrate” an old project to the most recent update of the Dart SDK/Flutter and his dependancies ?
First, I upgrade, replace and remove all the dependancies that needed (dependancies without null safety)
and launch the command flutter pub upgrade --major-versions
. The result of this was 1000 errors in the code due to changing, deleting and updating dependencies.
During my research, I found the command dart migrate
, but it was removed in Dart 3.
I don’t know if I take the good way to restore this Flutter project. I want to know if there is a better method to do that (obviously, I launch the command dart fix --apply
, it has fixed some minor errors).
Thanks in advance for answers !