flutter-intellij
flutter-intellij copied to clipboard
Color picker breaks hot reload
Steps to Reproduce
Use the color picker.
https://user-images.githubusercontent.com/58381615/136134003-c765a8a6-d809-428a-a4fb-c903b982afcb.mp4
Version info
[✓] Flutter (Channel stable, 2.5.2, on Microsoft Windows [Version 10.0.19043.1202], locale en-US)
• Flutter version 2.5.2 at C:\Users\fctor\Desktop\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (5 days ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\fctor\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.3\jbr\bin\java
• Java version OpenJDK Runtime Environment JBR-11.0.12.7-1504.28-jcef (build 11.0.12+7-b1504.28)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.1)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.11.31613.86
• Windows 10 SDK version 10.0.19041.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.3
• Flutter plugin version 60.1.4
• Dart plugin version 212.5486
[✓] VS Code (version 1.60.2)
• VS Code at C:\Users\fctor\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.26.0
[✓] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1202]
• Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.61
• Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78
! Doctor found issues in 1 category.
Dup of #5796.
I'm not sure this is a dupe. I have a local fix for https://github.com/flutter/flutter-intellij/issues/5796 but I doubt my fix would change anything for hot reload.
This happens when the plugin changes the value of a numeric color. You need to select a new color and have the code get updated. That does not happen for named colors, only numeric. I'm not exactly sure what goes wrong, but the the PSI tree contains at least one error node where the new color value occurs. I think it probably needs to update the PSI tree, which happens after the reload fails. Or maybe we need to do a more atomic update so the error node is not generated.