Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

flutter

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.

like image 569
Hur bangash Avatar asked Sep 06 '25 03:09

Hur bangash


2 Answers

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"
like image 73
CopsOnRoad Avatar answered Sep 07 '25 22:09

CopsOnRoad


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
like image 41
Byte Byte Avatar answered Sep 07 '25 22:09

Byte Byte