You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: <String, WidgetBuilder>{
// insert caret
},
);
}
}
Steps to Reproduce
add the routes: property for scaffold
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.
@branflake2267, I need your help to understand your feature request.
Do you prefer such code style, when list and map literals have explicit type annotations?
Or is there a lint that you enabled and that asks you to write these type annotations?
Because otherwise, if you don't need <String, WidgetBuilder>, there is very little for code completion to help you with. All you need is to type {} and start filling inside {}. I'm pretty sure that this would be faster than waiting for code completion.
I figured it'd be nice to declare the generic types when and if auto-generating the snippet of code to fill in. That's because I like an explicit story when I read the code. But not everybody likes it verbose like that. I suspect you're right the brackets are the only thing needed, seems like that's the trend to have less noise...
@branflake2267 commented on Wed Apr 04 2018
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.
Steps to Reproduce
Logs
Nothing useful.
Flutter Doctor
@zoechi commented on Fri Jul 06 2018
@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?
The text was updated successfully, but these errors were encountered: