flutter / flutter/flutter-intellij

AutoAssist in Android Studio for flutter List.length property mixed with List.length() method

Open
#2,587 5 comments 0 reactions 1 assignee Assigned to @scheglov View on GitHub
dependency: dart sdk topic-editing
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

Thanks for the feedback! If your issue is related to the Flutter framework itself,
please open an issue at
[github.com/flutter/flutter](https://github.com/flutter/flutter/issues/new).

## Steps to Reproduce
List strings=["hi"];
int i = strings.l

After typing "strings.l" hit ctrl-space to bring up the auto-assist window.
The entry that is highlighted has a "P" icon (indicating a property), but shows the method signature "length (int newLength)".
It looks like the AutoAssist is mixing the ".length" property with the ".length()" method.

I would expect two separate entries in the auto-assist list. One for the .length property (with a 'P' icon), and one for the .length() method (with an 'M' icon).

_Please tell us what you were doing and what went wrong_

## Version info

Please paste the output of running `flutter doctor -v` here (available from the command
line or from `Tools > Flutter > Flutter Doctor`). It will provide the version of the
Flutter framework as well as of the IntelliJ plugin.

Microsoft Windows [Version 10.0.17134.228]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\rtola\AndroidStudioProjects\flutter_app>flutter doctor -v
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
• Flutter version 0.5.1 at C:\Users\rtola\dev\flutter
• Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
• Engine revision 1ed25ca7b7
• Dart version 2.0.0-dev.58.0.flutter-f981f09760

[√] Android toolchain - develop for Android devices (Android SDK 28.0.1)
• Android SDK at C:\Users\rtola\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.

[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!

C:\Users\rtola\AndroidStudioProjects\flutter_app>

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.