VSCode Dart Import Shortcut


Does VSCode and/or a plugin offer a keyboard shortcut to automatically add an import in a Dart file? In IntelliJ and Android Studio this effect is easily achieved with Opt+Enter.


If you try to organize imports you can use Alt+Shift+O.

If you have a Type not recognised in the current file, you can use Ctrl+. (macOS: Cmd+.) to open Quick Fixes and select the imports you need (the searched import are dependent to your pubspec file).

See the key bindings of the Dart extension.

Answered By – Alexandre Ardhuin

Answer Checked By – Willingham (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *