Profile cover photo
Profile photo
Danny Tuppeny
844 followers -
Developer of Dart Code
Developer of Dart Code

844 followers
About
Communities and Collections
View all
Posts

Post has attachment
Dart Code v2.10.0 is available.

Makes it easier to manually set your SDK if one isn't detected automatically, gives better info for unhandled exceptions, much faster workspace-symbol search (if you're on a new enough SDK) and some other minor improvements.

https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code
Photo

Post has attachment
v2.9.0 of Dart Code is available; quite a lot in it :-) - 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)
- 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
- 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)
- Snippets have been added for Flutter widgets (`stless`, `stful`, `stanim`) and will show only inside Flutter projects
- 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)
- 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
- 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
- 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
- SDKs will now be listed by version number in the SDK picker
- Snippets will no longer be prioritised over other completions in the completions list
- A workaround for a change 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)
- 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)
- 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
- Opening a Dart file outside of a folder will no longer show errors in the developer console
- 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!)

Post has attachment
Dart Code v2.4.0 includes a new implementation of the "closing tags" preview which uses the analysis server (when used with latest dev SDK) and a couple of minor improvements.

If you try out the closing labels, please do send feedback :-)

Post has attachment
A short video from Bram Vanbilsen showing Dart Code's Flutter support :-)
Add a comment...

Post has attachment
Dart Code v2.0!

Adds flutter debugging support plus hot reloading :-)

As always, feedback appreciated!

Post has attachment
Can anyone explain what's causing this weird behaviour? When I remove some (seemingly superfluous) parens, the expression no longer works as expected. I spend 10 minutes staring at my screen trying to understand why a condition (which was essentially "if true && false") was executing and adding parens fixed it.

What's the explanation for why this outputs Two? It seems like madness to me!
Photo

Post has attachment
v1.4.2 includes several improvements to code completion, new test snippets and earlier activation for multi-project workspaces that don't contain pubspec.yaml files in their roots.

Post has attachment
I've pushed v1.4.0 of Dart Code. Includes improved code completion and code assists (lightbulbs).

Please send feedback; especially around the code completion changes (updating on extra keystrokes), I don't know if the improvements may come with drawbacks.

## Changes

- Code assists are now available and will show up as lightbulbs similar to existing code fixes (for example, `Wrap in new widget` in Flutter projects)
- Code completion will now refresh on certain key presses (`space`, `(`, `=`) which should result in more accurate results more often
- Code completion results are now sorted by relevance rather than alphabetically
- Cursor position should now be better maintained when executing code fixes
- `pubspec.yaml` and `analysisoptions.yaml` will once again use the built-in YAML language/highlighting
- When opening a flutter project, the `.packages` file will now also be used when trying to locate the Flutter SDK
- The error message shown when unable to locate the Flutter SDK has been simplified and a link to the Flutter download page added
- The environment variable `FLUTTER_HOME` is not recommended for use and will no longer be used to locate a Flutter SDK (`FLUTTER_ROOT` is still checked)

Post has attachment
Dart Code v1.3 released inc improved Flutter support - feedback wanted!

Thanks to Kyle Bradshaw, Dart Code now has the beginnings of support for working with Flutter projects :-)

I'm not very familiar with Flutter so I don't know if all the decisions made here are best so if you're using Flutter please do test it and send feedback GitHub issues are best).

I don't know if using FLUTTER_ROOT or FLUTTER_HOME are appropriate, but I couldn't find much info on them (the goal was to allow new flutter projects to work without needing you to do something to get an SDK inside the project folder - feedback or confirmation about this would be appreciated!).

- When opening a Flutter project, the below locations will be checked for a Flutter SDK and the embedded Dart SDK will be used (if no flutter SDK is found an error message will be shown)
- `.\bin\flutter(.bat)`
- `(FLUTTER_ROOT)\bin\flutter(.bat)`
- `(FLUTTER_HOME)\bin\flutter(.bat)`
- All folders in `PATH`
- Dart SDK update checks are now disabled for Flutter projects due to the embedded Dartk SDK
- Pub commands are now generally replaced with Flutter equivilents when a Flutter project is open (note: Pub commands still appear in the command palette for familiarity but will execute flutters versions)
- When `flutter: sdk: flutter` is added to/removed from `pubspec.yaml` you will be prompted to reload to switch between Dart/Flutter SDKs
- Pub commands will no longer appear in the command palette when a Dart project is not open

Post has attachment
Dart Code v1.1 supports opening folders that contain multiple dart packages as child folders (for example, the Flutter repo).

I'm not sure how this didn't come up before, but previously packages were resolved using the workspace root which has issues with "package:" imports.

Wait while more posts are being loaded