This requires the 'extension-methods' experiment to be enabled.
Try enabling this experiment by adding it to the command line when compiling and running.
Extension methods require Dart 2.6, so you need to update the SDK constraint in your pubspec.yaml to use them.
I'm not sure why you get this message - I got it too, but after changing my pubspec constraint and then changing it back, I get a better message:

And there's a quick-fix for it:

I've noted this at https://github.com/dart-lang/sdk/issues/37913#issuecomment-576787713, but in the meantime you can just manually update your pubspec.yaml to include this:
environment:
sdk: ">=2.6.0 <3.0.0"
Let me know if you still have issues after changing that!
I'm having the same issue in some projects, in pubspec.yaml I see the constraints:
environment:
sdk: ">=2.6.0 <3.0.0"
Flutter doctor:
[✓] Flutter (Channel beta, v1.14.6, on Mac OS X 10.15.3 19D76, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 3.5)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.42.1)
[✓] Connected device (4 available)
Dart version: 2.7.0
@diegoveloper do you still see this after restarting VS Code? What's the exact message you see when hovering over the error in the editor?
Yes, it's still happening after restarting VS-Code, closing the project, etc. (I didn't try restarting my laptop yet).

The app works fine, after I press the run app, VSCode show me this message.

But the app still works.
@diegoveloper that doesn't look like the same issue.. This issue is about extension methods not working, but your screenshot shows error importing specific packages.
If you've added those packages to your pubspec.yaml and pub get/flutter packages get ran and completed without error but you still see these, please open a separate issue with details.
@ximendougen I'll close this since I haven't heard back, but if the solution described at https://github.com/Dart-Code/Dart-Code/issues/2253#issuecomment-584109179 doesn't solve the issue for you, please let me know!
Extension methods require Dart 2.6, so you need to update the SDK constraint in your
pubspec.yamlto use them.I'm not sure why you get this message - I got it too, but after changing my pubspec constraint and then changing it back, I get a better message:
And there's a quick-fix for it:
I've noted this at dart-lang/sdk#37913 (comment), but in the meantime you can just manually update your
pubspec.yamlto include this:environment: sdk: ">=2.6.0 <3.0.0"Let me know if you still have issues after changing that!
This works for me 💯
I just update the dart version and restart the vs-code.
Most helpful comment
Extension methods require Dart 2.6, so you need to update the SDK constraint in your
pubspec.yamlto use them.I'm not sure why you get this message - I got it too, but after changing my pubspec constraint and then changing it back, I get a better message:
And there's a quick-fix for it:
I've noted this at https://github.com/dart-lang/sdk/issues/37913#issuecomment-576787713, but in the meantime you can just manually update your
pubspec.yamlto include this:Let me know if you still have issues after changing that!