Flutter requires SDK version
in pubspec.yaml - I resolved the issue by: Changing the: Environment variable to 1 point below what the SDK was requesting - for example the SDK was requesting 2.15.0 - I adjusted to 2.14.0 and run put get and then pub upgrade- environment: sdk: ">=2.14.0-144.0.dev <3.0.0" Also ensure that in File>Settings-> Languages and FrameWorks->Dart that the Dart SDK is set properly - it usually is inside of the flutter\bin folder
Go to 'Tools' -> Flutter -> 'Flutter Upgrade'
See if that works it out. If it's the SDK that needs upgrading you can't manually alter it
do this on your terminal :
flutter upgrade --force
Use this command system will be auto find match version of your project.
flutter pub add flutter_launcher_icons