We now show code completion for symbols that are not yet in scope. When one of these completions is selected, we’ll auto-update the imports for the file automatically. Users will need to do a lot less manual maintenance of their imports, and will be able to use code completion to better explore the set of available classes.
In the below example, choosing the top item in the list will add automatically an import for dart:math. To enable completions for other packages just add them to your pubspec.yaml.
This feature is available in IntelliJ 2019.1. It’s not current available in Android Studio stable version (3.4), but will be available in the upcoming Android Studio 3.5.
We’ve added several new lints and code assists to aid in using the new UI-as-code language features (spread collections and conditional expressions in lists).
The prefer_spread_collections lint: “Use spread collections when possible. Collection literals are excellent when you want to create a new collection out of individual items. But, when existing items are already stored in another collection, spread collection syntax leads to simpler code.”
The prefer_if_elements_to_conditional_expressions lint: “When building collections, it is preferable to use if elements rather than conditionals.”
The prefer_for_elements_to_map_fromIterable lint: “When building maps from iterables, it is preferable to use for elements.”
More details about changes are fixes are available in our changelog.
To address user feedback on the challenge of seeing widget tree structures from code, we added a new feature called Editor UI Guides in this release. UI Guides help developers better visualize the structure of their widget code, especially in large build methods.
Here’s an example from a Calculator app, where the UI Guides clearly illustrate how the UI is built (from an Expanded Column containing several KeyRow’s of NumberKeys):
Based on feedback from developers who tried the UI Guides in a UX study, we also added visual indicators on the editor’s scrollbar to help developers quickly locate the widget code in a large Dart file:
Since both features are new, they’re not on by default yet. To see them, enable the ‘UI Guides’ setting in Preferences > Languages & Frameworks > Flutter (see the screenshot below). We encourage you to give it a try! You can send us your feedback at github.com/flutter/flutter-intellij/issues.
--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
Hi Nilay,I have a problem with the improved Code Completion. Since the update I have many duplicate lines in the suggestion. e.g. why I see five times "EdgeInsets.only". Is it possible to group it to show only the parameter? I don't need all the different packages.
thanks