skip to Main Content

enter image description here

i’m facing this issue i’m new in flutter please help me to solve this issue
thanks

i tried to change sdk to
sdk: ‘>=2.12.0 <3.0.0’

but still i face issue i don’t know why i also change sdk to
sdk: ‘>=2.12.0 <3.0.6’

but i again face same error

HERE IS COMPLETE ERROR
C:flutterbinflutter.bat –no-color pub get
Resolving dependencies…
The lower bound of "sdk: ‘>=2.8.0 <3.0.0’" must be 2.12.0’
or higher to enable null safety.

The current Dart SDK (3.0.6) only supports null safety.

For details, see https://dart.dev/null-safety

2

Answers


  1. run flutter upgrade command in the console to upgrade flutter and dart

    Login or Signup to reply.
  2. Do this:

    • Migrate sdk to latest or version >=2.12.0 in your pubspec.yaml, eg: sdk: ‘>=3.0.5 <4.0.0’
    • run dart analyze . and correct the errors it outputs.

    For more information about Dart 3 migration, check here.

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