Fix empty Flutter SDK dropdown in New Project wizard on IJ 2026.2 - #9110
Fix empty Flutter SDK dropdown in New Project wizard on IJ 2026.2#9110Akshatvyas05 wants to merge 2 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where the Flutter SDK dropdown was empty in the New Project wizard on IntelliJ Platform 2026.2 by specifying a modality state when updating the combo box. The reviewer raised a valid concern regarding the use of ModalityState.any(), recommending ModalityState.stateForComponent(combo) instead to avoid executing UI updates on potentially disposed components.
dc4647c to
db62f6c
Compare
The Flutter SDK combo box in the New Project wizard and Flutter settings page is populated asynchronously: known SDK paths are resolved on a background thread, then the UI update is scheduled back onto the EDT via OpenApiUtils.safeInvokeLater(). On IntelliJ Platform 2026.2 this deferred update no longer runs while the New Project wizard's modal dialog is showing, leaving the SDK dropdown empty. Passing ModalityState.stateForComponent(combo) ensures the update runs in the correct modality state associated with the combo box itself, so it fires even while the modal wizard is open, without the broader risk of ModalityState.any(). Fixes flutter#9106
db62f6c to
cc541c8
Compare
|
@helin24 kindly provide your feedback. |
|
Hi! Thanks for making this fix. Unfortunately, I'm not sure if this actually fixes the problem, because I built a plugin with this branch and I still see the issue. It may be that the initial issue I filed is inaccurate; so I will update there. |
|
Thanks for updating the issue - that helps a lot. I can see the scope is broader than I first thought, so I’m going to spend some time getting more familiar with the code path and the wizard state flow to understand the underlying issue more deeply before making another change. |
|
Okay great! I appreciate your help looking into this issue. |
Fixes #9106
What this changes
The Flutter SDK combo box in the New Project wizard (and Settings page) is
populated asynchronously: known SDK paths are resolved on a background
thread, then the UI update is scheduled back onto the EDT via
OpenApiUtils.safeInvokeLater().On IntelliJ Platform 2026.2, this deferred update no longer runs while the
New Project wizard's modal dialog is open, leaving the SDK dropdown empty.
Passing
ModalityState.any()ensures the update runs regardless of anyopen modal dialog.
How to verify
./gradlew runTarget -Pide=AndroidStudio -PideV=2026.2.1.4(before this fix, the dropdown was empty)
AUTHORSfile.CHANGELOG.md.