dart-pad
dart-pad copied to clipboard
Code assistance context menu is missing
What happened?
DartPad appears to have been updated in a major way. I noticed that following the update, the code assistance context menu for Flutter (with commands like "Wrap in SizedBox", "Remove widget", "Swap with parent", etc) is no longer accessible.
Steps to reproduce problem
Open DartPad, switch to a Flutter sample, position the cursor on a widget constructor and press Opt-Enter (for Mac, may vary by OS).
Browser
Browser: Chrome
Version: 121.0.6167.160
Are you using any extensions/plugins that affect website behavior (particularly those that affect iframes, such as ad blockers)? No
Are there any warnings or errors in your browser's JavaScript console? No
Machine
Operating system: MacOS
Version: Sonoma 14.3.1
Whoa, I didn't even know this feature existed. If we bring it back (and it sounds like a cool thing to have!), I suggest we do something to make it more discoverable. For example, maybe a button in the toolbar or something like that.
It works similarly in VS Code and AndroidStudio when using the Flutter plugins.
I think the issue is that keybinding changed - it's now command-.
(visible from the keybindings shortcut action in the bottom left).
It may be that we should alias the keyboard shortcut?
Oh interesting. I guess this changed from the default AndroidStudio key binding to the default VS Code keybinding. It would be much appreciated if you could support both!
It works similarly in VS Code and AndroidStudio when using the Flutter plugins.
Right, but one big difference is that they show a small UI element (in code it's a lightbulb) to let the user know that this menu exists. I've love to see something similar in DartPad.
That's true.