flutter / flutter/flutter-intellij

Code suggestion is out of context when used inside const widget

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

Description

## Issue

### On Android Studio

Code suggestion when on const widget:

Image

Code suggestion when we remove the const:

Image

### On Visual Code

Code suggestion when on const widget:

Image

Code suggestion when we remove the const:

Image

## Info

Android Studio Version

```
Android Studio Narwhal 3 Feature Drop | 2025.1.3
Build #AI-251.26094.121.2513.14007798, built on August 28, 2025
Runtime version: 21.0.7+-13880790-b1038.58 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.5
Kotlin plugin: K2 mode
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
ide.instant.shutdown=false
debugger.new.tool.window.layout=true
ide.experimental.ui=true
Non-Bundled Plugins:
com.intellij.marketplace (251.26094.157)
manjaro.ptpb (1.7)
com.redhat.devtools.lsp4ij (0.14.2)
com.arcticicestudio.nord.jetbrains (0.13.0)
Key Promoter X (2024.2.2)
Dart (251.27623.5)
com.thvardhan.gradianto (5.5)
jd-intellij (0.8.1)
monokai-pro (1.10)
com.vermouthx.idea (1.15.2)
com.developerphil.adbidea (1.6.19)
com.github.copilot (1.5.59-243)
io.flutter (88.1.0)
```

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.