Dart Code
Dart & Flutter support for Visual Studio Code

Refactorings and Code Fixes

Ctrl+. in Code opens the “lightbulb” menu showing all code fixes/refactors. Code v1.20 gained the ability to keybind quickfixes. To do this you should edit your keybindings.json file and include the ID of the refactor as found below. If the kind for the keybind is set to just a segment of the ID (for example ‘refactor.surround’) then all actions sharing that prefix will appear in a filtered menu (or if only one, the action invoked immediately). You can control this behaviour with the apply argument see docs.

The list of refactors comes from the Dart analysis server and therefore may change over time. Once this list is available somewhere centrally the readme will be updated to link there.

Note: These IDs are only provided by recent versions of the Dart analysis server and will not work with older/v1 builds.

Fork me on GitHub