flutter / flutter/flutter-intellij

Add auto assist for the map literal creation for routes

Open
#2,929 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

@branflake2267 commented on [Wed Apr 04 2018](https://github.com/flutter/flutter/issues/16206)

I'd like to suggest adding auto assist completion for the map literal with types for the Scaffold routes argument. Something like the children literal array is created for ListView could be useful.

```
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(),
// ~~~ auto assist could create this...
routes: {
// insert caret
},
);
}
}
```

![screen shot 2018-04-03 at 7 35 34 pm](https://user-images.githubusercontent.com/1326504/38285840-ec4aaa18-3776-11e8-8ed6-010a9401cf23.png)

## Steps to Reproduce

1. add the routes: property for scaffold
2. key in control + space to try to auto assist completion

## Logs
Nothing useful.

## Flutter Doctor

```
brandons-mbp:flutter_preferences branflake2267$ flutter doctor -v
[✓] Flutter (Channel master, v0.2.9-pre.17, on Mac OS X 10.13.3 17D102, locale en-US)
• Flutter version 0.2.9-pre.17 at /Users/branflake2267/git/flutter
• Framework revision 7a6a65a597 (12 minutes ago), 2018-04-03 19:31:08 -0700
• Engine revision 04f3c6557c
• Dart version 2.0.0-dev.43.0.flutter-52afcba357

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/branflake2267/Library/Android/sdk
• Android NDK at /Users/branflake2267/Library/Android/sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
✗ Android license status unknown.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.3, Build version 9E145
• ios-deploy 1.9.2
• CocoaPods version 1.4.0

[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2018.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 23.1.3
• Dart plugin version 181.4203.498

[✓] IntelliJ IDEA Community Edition (version 2017.3.5)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 22.2.2
• Dart plugin version 173.4700

[✓] VS Code (version 1.21.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension version 2.11.1

[!] Connected devices
! No devices available

! Doctor found issues in 2 categories.
```

---

@zoechi commented on [Fri Jul 06 2018](https://github.com/flutter/flutter/issues/16206#issuecomment-402983678)

@devoncarew do you think this can be done.
Should this issue be moved to dart-lang/sdk to get the attention of the analyzer team?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.