Fixing Flutter GitHub Project Import Error: Dart SDK Version and Null Safety Compatibility

123 Views Asked by At

While importing any project in flutter from github it shows The lower bound of "sdk: '>=2.7.0 <3.0.0'" must be 2.12.0' or higher to enable null safety. The current Dart SDK (3.2.3) only supports null safety....? How to overcome this error?

Tried pub get ,pub upgrade and pub outdated but doesnt work

1

There are 1 best solutions below

0
On

Your SDK bounds should be sdk: '>=2.7.0 <4.0.0'

Because you are using SDK 3.2.3 and bounds are between 2.7.0 to 3.0.0

So to solve this problem, just increase the upper version of SDK to 4.0.0