Dart-Code

Dart and Flutter support for VS Code

MIT License

Stars
1.5K
Committers
60

Bot releases are hidden (Show)

Dart-Code - Dart Code v2.9.0 Beta 3

Published by DanTup over 6 years ago

A release candidate containing v2.9.0 changes. Download the vsix file above and see instructions here for installing. Once v2.9.0 ships to the marketplace you will receive the update as normal.

Changes

  • A new setting (dart.previewDart2) has been added which allows you to opt-in to Dart 2 behaviour such as optional new/const (you must be using an SDK that supports this!)
  • A new command (Flutter: New Project) has been created to simplify the process of creating and opening a new Flutter project (unlike others, this command is in the palette even without a project open)
  • Code completions will no longer insert parentheses/argument placeholders if they are already present
  • Code completions will now longer insert named argument placeholders if a value is already present
  • Due to a number of issues with the implementation, external files (SDK, packages) will no longer open read-only (this behaviour may be restored in some form in future)
  • Snippets will no longer be prioritised over other completions in the completions list
  • Flutter and Dart debuggers have been merged, you will no longer be asked to choose between Flutter and Dart when running new projects!
    • As part of this, the type attribute on launch configurations in your launch.json will be automatically changed from dart-cli/flutter to dart upon opening the project
  • Flutter projects no longer require a launch.json file if being launched with default arguments; if you hit F5 in a project without one it will just launch immediately
  • Snippets have been added for Flutter widgets (stless, stful, stanim) and will show only inside Flutter projects
  • If your packages are missing or out of date you will be prompted to run pub get/flutter packages get upon loading your project (this can be disabled with the new dart.promptToFetchPackages setting, which can be set at the folder level)
  • A workaround for a change (bug?) in VS Code 1.20 that causes breakpoints to not be hit on Windows has been implemented
  • Package restore commands will now be terminated and re-run if you invoke them again while they are already running (this includes if you change pubspec.yaml and save)
  • A spinner will be shown in the status bar during analysis
  • A spinner will be shown in the status bar while Flutter/Pub commands are running
  • Executing package restore commands in a workspace that has no pubspec.yaml on Windows will no longer get the extension stuck in a loop
  • Saving pubspec.yaml in a Dart project will no longer run flutter packages get if you have a Flutter project in the same workspace
  • Fetching flutter packages will no longer sometimes unexpectedly ask you for the workspace folder to run the command in
  • Quick Fixes and other code actions that insert code now support tab stops and selections (for example the Wrap with new widget assist will now select the text widget for you to type over)
  • SDKs will now be listed by version number in the SDK picker
  • Quick fixes will now be sorted in the lighbulb menu by the severity of the error that they fix
  • Quick fixes and code assists are now categorised as QuickFix and Refactor in Code to allow for keybinding a specific type

Preview Features available in this version

Dart-Code - Dart Code v2.9.0 Beta 2

Published by DanTup over 6 years ago

A release candidate containing v2.9.0 changes. Download the vsix file above and see instructions here for installing. Once v2.9.0 ships to the marketplace you will receive the update as normal.

Changes

  • A new setting (dart.previewDart2) has been added which allows you to opt-in to Dart 2 behaviour such as optional new/const (you must be using an SDK that supports this!)
  • Code completions will no longer insert parentheses/argument placeholders if they are already present
  • Code completions will now longer insert named argument placeholders if a value is already present
  • Due to a number of issues with the implementation, external files (SDK, packages) will no longer open read-only (this behaviour may be restored in some form in future)
  • Snippets will no longer be prioritised over other completions in the completions list
  • Flutter and Dart debuggers have been merged, you will no longer be asked to choose between Flutter and Dart when running new projects!
    • As part of this, the type attribute on launch configurations in your launch.json will be automatically changed from dart-cli/flutter to dart upon opening the project
  • Flutter projects no longer require a launch.json file if being launched with default arguments; if you hit F5 in a project without one it will just launch immediately
  • Snippets have been added for Flutter widgets (stless, stful, stanim) and will show only inside Flutter projects
  • If your packages are missing or out of date you will be prompted to run pub get/flutter packages get upon loading your project (this can be disabled with the new dart.promptToFetchPackages setting, which can be set at the folder level)
  • An issue with breakpoints sometimes not being hit for Dart projects on Windows has been resolved
  • Package restore commands will now be terminated and re-run if you invoke them again while they are already running (this includes if you change pubspec.yaml and save)
  • A spinner will be shown in the status bar during analysis
  • A spinner will be shown in the status bar while Flutter/Pub commands are running
  • Executing package restore commands in a workspace that has no pubspec.yaml on Windows will no longer get the extension stuck in a loop
  • Saving pubspec.yaml in a Dart project will no longer run flutter packages get if you have a Flutter project in the same workspace
  • Fetching flutter packages will no longer sometimes unexpectedly ask you for the workspace folder to run the command in
  • Quick Fixes and other code actions that insert code now support tab stops and selections (for example the Wrap with new widget assist will now select the text widget for you to type over)
  • SDKs will now be listed by version number in the SDK picker
  • Quick fixes will now be sorted in the lighbulb menu by the severity of the error that they fix
  • Quick fixes and code assists are now categorised as QuickFix and Refactor in Code to allow for keybinding a specific type

Preview Features available in this version

Dart-Code - Dart Code v2.8.2

Published by DanTup over 6 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • Code completion has been updated to use a new field provided by the analysis server that allows the text to be inserted to be different from the text displayed in the completion

Preview Features available in this version

Dart-Code - Dart Code v2.9.0 Beta 1

Published by DanTup over 6 years ago

A release candidate containing v2.9.0 changes. Download the vsix file above and see instructions here for installing. Once v2.9.0 ships to the marketplace you will receive the update as normal.

Changes

  • A new setting (dart.previewDart2) has been added which allows you to opt-in to Dart 2 behaviour such as optional new/const (you must be using an SDK that supports this!)
  • Code completions will no longer insert parentheses/arguments if they are already present
  • Flutter and Dart debuggers have been merged, you will no longer be asked to choose between Flutter and Dart when running new projects!
    • As part of this, the type attribute on launch configurations in your launch.json will be automatically changed from dart-cli/flutter to dart upon opening the project
  • Flutter projects no longer require a launch.json file if being launched with default arguments; if you hit F5 in a project without one it will just launch immediately
  • Snippets have been added for Flutter widgets (stless, stful, stanim) and will show only inside Flutter projects
  • If your packages are missing or out of date you will be prompted to run pub get/flutter packages get upon loading your project (this can be disabled with the new dart.promptToFetchPackages setting, which can be set at the folder level)
  • Package restore commands will now be terminated and re-run if you invoke them again while they are already running (this includes if you change pubspec.yaml and save)
  • Executing package restore commands in a workspace that has no pubspec.yaml on Windows will no longer get the extension stuck in a loop
  • Saving pubspec.yaml in a Dart project will no longer run flutter packages get if you have a Flutter project in the same workspace
  • Fetching flutter packages will no longer sometimes unexpectedly ask you for the workspace folder to run the command in
  • Quick Fixes and other code actions that insert code now support tab stops and selections (for example the Wrap with new widget assist will now select the text widget for you to type over)
  • SDKs will now be listed by version number in the SDK picker
  • Quick fixes will now be sorted in the lighbulb menu by the severity of the error that they fix
  • Quick fixes and code assists are now categorised as QuickFix and Refactor in Code to allow for keybinding a specific type

Preview Features available in this version

Dart-Code - Dart Code v2.8.1

Published by DanTup over 6 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

Code 1.20.0 included a change that broke debugging for projects without a launch.json. A fix is on its way but in the meantime a workaround has been added to restore the ability to debug. As a consequence you will need to select the correct debug type twice when first debugging a project with no launch.json but this will be addressed in a future update (after Code's fixes are live).

Preview Features available in this version

Dart-Code - Dart Code v2.8.0

Published by DanTup over 6 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • Code completion will automatically trigger when manually typing import " to help complete package/filenames
  • Code completion will automatically trigger in the correct location when completing the import ""; snippet to help complete package/filenames
  • The document symbol list will no longer fail to load for documents returning CONSTRUCTOR_INVOCATION symbols in results
  • Code completion will no longer fail to load for documents returning CONSTRUCTOR_INVOCATION symbols in results
  • The debug adapter should no longer crash if you print() JSON that looks like a flutter command while debugging a flutter application (additional improvements over those already made in previous releases)
  • Debug status text like "Initializing hot reload" will no longer remain visible if you terminate a debugging session while it is visible
  • The "Full restart recommended" hint has been moved from an information bar at the top of the window to the status bar
  • Pressing the debuggers Restart button to perform a hot reload will no longer crash if you have unsaved changes
  • Invoking Save All will no longer cause multiple hot reload requests which could result in crashes
  • If a hot reload is requested while another is in progress, the message "Reload already in progress" will be displayed in the debug output and the request ignored

Preview Features available in this version

Dart-Code - Dart Code v2.8.0 Release Candidate 1

Published by DanTup over 6 years ago

A release candidate containing v2.8.0 changes. For instructions on installing from a vsix see instructions here.

Changes

  • Code completion will automatically trigger when manually typing import " to help complete package/filenames
  • Code completion will automatically trigger in the correct location when completing the import ""; snippet to help complete package/filenames
  • The document symbol list will no longer fail to load for documents returning CONSTRUCTOR_INVOCATION symbols in results
  • Code completion will no longer fail to load for documents returning CONSTRUCTOR_INVOCATION symbols in results
  • The debug adapter should no longer crash if you print() JSON that looks like a flutter command while debugging a flutter application (additional improvements over those already made in previous releases)
  • Debug status text like "Initializing hot reload" will no longer remain visible if you terminate a debugging session while it is visible
  • The "Full restart recommended" hint has been moved from an information bar at the top of the window to the status bar
  • Pressing the debuggers Restart button to perform a hot reload will no longer crash if you have unsaved changes
  • Invoking Save All will no longer cause multiple hot reload requests which could result in crashes
  • If a hot reload is requested while another is in progress, the message "Reload already in progress" will be displayed in the debug output and the request ignored

Preview Features available in this version

Dart-Code - Dart Code v2.7.3

Published by DanTup over 6 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • Typing a { will no longer cause code completion to automatically appear unless it was immediately preceeded by a $

Preview Features available in this version

Dart-Code - Dart Code v2.7.1

Published by DanTup almost 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • Further improvements have been made to reduce the chances of printing JSON from Flutter apps from crashing the debugger
  • If during a hot reload, code that has changed was not re-executed (for example if you change the main method) you will now see a notification with an option to perform a full restart
  • Long Dart SDK version numbers (git hashes) will now be truncated in the status bar (the full version is available in the tooltip)

Preview Features available in this version

Dart-Code - Dart Code v2.7.0

Published by DanTup almost 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • When debugging, call stacks on Windows should no longer show long (incorrect) relative paths
  • Find references will no longer hang with Loading... if invoked somewhere that has no results (eg. keywords)
  • Code completion will no longer hang with Loading... when using the Angular plugin and there are no results
  • Code completion will now trigger automatically after typing $ or { inside strings
  • Saving pubspac.yaml in a Flutter project will no longer run pub get but instead run the Flutter eqvuilent
  • Executing SDK commands will now pick a more appropriate workspace (or prompt for one if it cannot)
  • Folders named packages that contain real projects (like inside the Flutter repo) will now be detected more accurately (reducing package path resolution issues)
  • The Flutter debugger will no longer crash if you print a JSON array
  • The Flutter debugger will no longer hang if you create breakpoinst prior to launching the debug session
  • Vanilla Flutter projects inside the Fuchsia tree should now be treated like Flutter and not Fuchsia, enabling the Flutter deamon and debugging support

Preview Features available in this version

Dart-Code - Dart Code v2.7.0 Beta 1

Published by DanTup almost 7 years ago

A beta release containing v2.7.0 changes. For instructions on installing from a vsix see instructions here.

Dart-Code - Dart Code v2.6.2

Published by DanTup almost 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • An issue with pub and flutter commands not working from the command palette (introduced in v2.6.0) has been fixed

Preview Features available in this version

Dart-Code - Dart Code v2.6.1

Published by DanTup almost 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • The error message displayed when the analysis server cannot be found is more useful (previously it incorrectly reported that it had terminated)
  • An issue where the analysis server was not found if the dart executable in your PATH is a symlink (introduced in v2.6.0) has been fixed

Preview Features available in this version

Dart-Code - Dart Code v2.6.0

Published by DanTup almost 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Multi-root support

VS Code 1.18 gained support for multi-root workspaces, which allows multiple folders to opened at the same time. Perviously, much of Dart Code's functionality would just act on the first folder in the list. Now, all functionality should work as you would expect.

  • When adding a Flutter or Fuchsia project to a multi-root workspace that didn't previously have one, you will be prompted to reload to allow switching to the correct SDK
  • When running Flutter/Pub commands with multiple projects open, you will be prompted to select which folder to execute them for
  • Several settings have been promoted to resource-level which allows them to be set at a folder level even inside a multi-root workspace:
    • dart.insertArgumentPlaceholders
    • dart.lineLength
    • dart.pubAdditionalArgs
    • dart.runPubGetOnPubspecChanges
    • dart.flutterRunLogFile
    • dart.debugSdkLibraries
    • dart.debugExternalLibraries
    • dart.observatoryLogFile
  • Settings not listed above as resource-level must now be set at a User or Workspace level (VS Code will highlight such settings if you set them at a folder level)
  • The Dependency tree is hidden when you are working in a multi-rook workspace

Other Changes

  • SDK search paths have been simplified to make them easy to understand when trying to diagnose missing SDK issues
  • The dart.sdkContainer setting has been renamed to dart.sdkPaths and an array of multiple paths (this allows you to list several SDKs or folders full of SDKs can quickly switch between them using the SDK Version in the status bar)
  • The SDK Version switcher is now available for Flutter and Fuchsia projects
  • A new setting has been added to override the Flutter SDK location (dart.flutterSdkPath)
  • SDK overrides now apply to all project type (Fuchsia, Flutter, Dart)
  • The depdency tree will no longer appear in the explorer pane when there are no dependencies to show

Preview Features available in this version

Dart-Code - Dart Code v2.5.1

Published by DanTup almost 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • Chinese characters in paths should no longer result in breakpoints not being hit during debugging

Preview Features available in this version

Dart-Code - Dart Code v2.5.0

Published by DanTup almost 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • A new Open Observatory command is now available during Dart and Flutter debugging sessions to launch Observatory in a browser
  • A new Open Timeline command is now available during Flutter debugging sessions to launch the Observatory Timeline in a browser
  • Closing Labels are now enabled by default when you are using a version of the SDK that supports it
    • A new option (dart.closingLabels) has been added to allow these to be disabled
  • The setting dart.flutterHotReloadOnSave now defaults to true and will force a hot reload upon saving (if there are no errors in the file being saved)
  • Progress messages will now be shown in the status bar when building/debugging Flutter projects
  • Characters typed at the end of a line will no longer appear after the Closing Labels
  • The dart.sdkContainer option (which adds a quick" SDK Picker") now works if pointing directly at an SDK instead of its parent

Preview Features available in this version

Dart-Code - Dart Code v2.4.4

Published by DanTup almost 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • The search path for the Flutter SDK cached by Fuchsia has been updated in line with the latest Fuchsia code
  • The dart.userDefinedSdkPath setting will now override the Dart SDK used for Fuchsia projects (this is temporary until Fuchsia and Flutter get their own override)

Preview Features available in this version

Dart-Code - Dart Code v2.4.3

Published by DanTup about 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

Note: This version requires Visual Studio Code 1.17.

  • The search path for the Dart SDK in Fuchsia projects has been updated to reflect the new location in a third_party folder
  • Several debug APIs are being removed in Code 1.18 so Dart Code has been moved off them - these should have no visible effects but since there was a lot of refactoring there is risk of new bugs in:
    • Code that provides debug configurations for new projects that do not have a .vscode/launch.json file
    • Code that supplements the launch config with things like SDK paths before passing to the debug adapter
    • Code that passes custom commands (like Flutter's hot reload, toggle debug painting, etc.) from the IDE to the debug adapter

Preview Features available in this version

Dart-Code - Dart Code v2.4.2

Published by DanTup about 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Changes

  • The Closing Labels preview feature will no longer show a toast popup asking for feedback every time it activates

Preview Features available in this version

Dart-Code - Dart Code v2.4.1

Published by DanTup about 7 years ago

Dart Code can be installed from the Visual Studio Code Marketplace. Open VS Code Quick Open (Ctrl+P) and paste the following and press enter:

ext install dart-code

Note: This version requires Visual Studio Code 1.16.

Changes

  • Tooltips for items with no dartdocs will now appear correctly (a breaking change in Code 1.16 resulted in these disappearing)
  • The text colour for Closing Labels preview can now be controlled using the dart.closingLabels colour (you can set this in your settings, inside the workbench.colorCustomizations section - see here)
  • Go-to-Definition will no longer sometimes open some files inside your own project as read-only on Windows because of path casing differences
  • TODOs will now appear with lower priority than lints and hints in the Problems pane
  • The error message shown when the Flutter SDK cannot be find will now correctly refer to the FLUTTER_ROOT environment variable instead of FLUTTER_HOME

Preview Features available in this version