Hur bangash
Hur bangash

Reputation: 300

This requires the 'super-parameters' language feature to be enabled

I am using super keyword in initState method.but i am getting this error 'This requires the 'super-parameters' language feature to be enabled. Try updating your pubspec.yaml to set the minimum SDK constraint to 2.16.0 or higher, and running 'pub get'.dart(experiment_not_enabled)'.Need help please.

Upvotes: 30

Views: 26477

Answers (4)

user17302177
user17302177

Reputation:

environment: sdk: '>=3.1.0 <4.0.0'

The above are current Version to work on.

Upvotes: 0

SHUBHAM Kaushik
SHUBHAM Kaushik

Reputation: 1

change 2.16 to 2.17 in pubspec.yaml file that solved my problem don't do upgrade after that

Upvotes: 0

Byte Byte
Byte Byte

Reputation: 103

Also, if you have

environment:
  sdk: ">=2.17.0 <3.0.0"

and you still have an error, try to upgrade you dependencies:

flutter packages upgrade

Upvotes: 10

CopsOnRoad
CopsOnRoad

Reputation: 267444

super-parameters were added in Dart 2.17.0.

If you're not already using the latest version, run

flutter upgrade

To use super-parameters in your app, open your pubspec.yaml file and update sdk to target min 2.17.0:

environment:
  sdk: ">=2.17.0 <3.0.0"

Upvotes: 21

Related Questions