Error: This requires the ‘non-nullable’ experiment to be enabled

This problem was occured for me after upgrading the Flutter.
I solved it by cleaning and upgrading the project dependencies again.
Run the below commands in the root directory of your project:

flutter clean
flutter packages pub upgrade
flutter pub run build_runner build

Also as others said, please make sure your sdk version in the pubspec.yaml is compatible with your flutter sdk version.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)