flutter / flutter/flutter-intellij
Hints completes code in the wrong places
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
Try to create this code:
```
StreamSubscription? subscription;
subscription?.cancel();
```
You will see this hint:
`Missing an 'await' for the 'Future' computed by this expression.`
So you hit Option+Enter (MacOS) and you get this:
Accept it and it will generate this:
Which is completely wrong, the `await` is being placed at the wrong place.
This happens for multiple other "smart completes" (sorry I don't know the name of these).
_______
Another example:
```dart
class TestClass {
List list = [];
}
// ....
final test = TestClass();
test.list.for // hit Tab here to accept the "for" shortcut
```
This is what it generates:
Which we can see it's placing the `for` at the wrong place. It looks like it can't understand that the list belongs to an object, and can't be used by itself.
@alexander-doroshko, is this something at your end?
Contributor guide
Assessment
This issue has not been assessed yet.