skip to Main Content

Yesterday i cloned a project from github. There were some errors in this project and gpt told me to type ‘flutter clean’ and then ‘flutter pub get’. After running ‘flutter clean’, I couldn’t use ‘flutter pub get’ command started giving ‘null-safety’ errors version mismatch errors.
Then I wanted to open one of my own projects, and when I opened it, the file names were yellow and it was giving many warning messages.When I want to compile, it waits for a very long time and nothing happens, it doesn’t open the application in the emulator.I have added the flutter doctor command some of the errors and my pubspec photo to the description
enter image description hereenter image description here

I tried uninstalling and reinstalling flutter but failed.I formatted the MacBook instead.I installed everything from scratch, I installed all the packages, but this event did not change.I searched a lot on the internet but I couldn’t find the solution.

2

Answers


  1. Try updating the packages to the latest update from pub.dev then debug the app if it’s still not working show me the errors

    Login or Signup to reply.
  2. You probably had an older version of Flutter and upgraded it or just enabled the linter. Most of these errors are easy to fix (and you probably should fix them). Try running dart fix --apply, it’ll probably automatically fix some of the issues in your code.

    You don’t have any errors in your code (red), just warnings (yellow) and info (blue), so your project should still compile and run. If it doesn’t, check the console output to see the specific reason it doesn’t.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search