Flutter Code Actions bulb not appearing

Hi all, love Cursor! But when using it for Flutter it appears the ‘lightbulb’ feature that generally appears in VSCode is not appearing in Cursor, despite all the marketplace addons being present. This is super handy for wrapping and removing widgets in the tree. Anybody have any ideas why it seems Cursor is not showing it? Thanks!

(It looks like this may be related - Quick Fix bulb does not appear automatically)

4 Likes

Just use Ctrl-Shift-R (on a Mac).

Or go AI - Cmd-K / mark + Cmd-Shift-L

2 Likes

For anyone else having this issue, clicking anywhere in the widget name and hitting ‘ctrl+.’ (control and period), will bring up the actions menu.

4 Likes

Is there any way to have actions show just by click on certain parts of the code like in VS Code?

1 Like

I personally never found a way. I have to click first in the right area the code-actions bulb would normally automatically appear and then do ‘ctrl+.’. Definitely a nuisance. There is another thread where the devs said they would re-enable it but I don’t think it ever happened as that was quite a while ago now.

1 Like

In half the cases, clicking “AI repair” is the best solution. If it’s missing imports, go Cmd-.


When I enable the action bulb, it appears but is not clickable. Please fix this issue as it is the most important feature while working with Flutter. This bug has been around for a long time, and no progress has been made to resolve it. Using Ctrl+. repeatedly for such a frequently used feature is frustrating and significantly slows down the coding process. I constantly switch between the Cursor and VS Code, and when I’m not working with AI, I go back to VS Code solely because of this issue.

4 Likes

As a Flutter developer, the main reason I haven’t subscribed to Cursor and still use VSCode is this. I hope it gets resolved as soon as possible.

Thanks for reporting the bulb is not clickable.

As others have mentioned, the same menu should still be accessible using CMD + ., but we will try to fix the UI element too!

4 Likes

It sometimes working by the way but i couldn’t figure out whats breaking it.
Here is an example i hope it helps;
Feb-05-2025 16-31-52

1 Like

Thanks for the gif, super helpful!
Hope to get this sorted soon.

1 Like

@danperks this is still not fixed…

Hey, what if you try clicking while holding Cmd/Ctrl?

Unfortunately, the lack of this feature is a deal breaker for me. Shifting to using a keyboard shortcut for quick actions is fine. But that still doesn’t cover the lightbulb → import quick fix actions. Unless someone has a workaround for this lack of functionality? Having to Fix in Chat with AI for every import I need to do isn’t practical.

For now…switching back to VSC until this is fixed. :(. Please help / fix this! Because other than that, Cursor rocks!

Adding to this bug report:

Title: Missing Import Quick Fix/Lightbulb Feature in Cursor IDE

Description:
The Cursor IDE is missing the quick fix/lightbulb feature for imports that is available in VS Code. This makes the development experience significantly more difficult, especially when working with Flutter/Dart projects that require frequent imports.

Current Behavior:

  • No lightbulb appears when hovering over undefined classes
  • No quick fix suggestions for missing imports
  • Users must manually search for and add imports

Expected Behavior:

  • Lightbulb should appear when hovering over undefined classes
  • Quick fix suggestions should be available for missing imports
  • Similar to VS Code’s import suggestion functionality

Impact:

  • Significantly slows down development workflow
  • Forces users to switch between Cursor and VS Code for import-related tasks
  • Reduces the overall efficiency of using Cursor as a primary IDE

Steps to Reproduce:

  1. Open a Flutter/Dart project in Cursor
  2. Try to use a class that hasn’t been imported
  3. Notice the lack of quick fix suggestions

This is also breaks the quick action to add type annotations. Please fix this! Otherwise, Cursor is great…but it is almost unusable for Flutter. Thanks

Title: Missing Type Annotations Quick Fix Not Working in Cursor

Description:

The lightbulb menu quick fix for adding type annotations in Dart/Flutter files is not working in Cursor. This was previously working in VSCode and is a critical feature for maintaining type safety in Dart code.

Steps to Reproduce:

  1. Open a Dart/Flutter file in Cursor

  2. Create a situation where a type annotation is missing (e.g., in a List declaration or function parameter)

  3. The lightbulb icon should appear in the left margin indicating a missing type annotation

  4. Click the lightbulb icon or use the keyboard shortcut (Cmd/Ctrl + .)

Expected Behavior:

  • Lightbulb menu should appear with the “Add type annotation” quick fix

  • Clicking the fix should automatically add the appropriate type annotation

  • Keyboard shortcuts should work to access the menu

Actual Behavior:

  • Lightbulb menu appears, and can be brought up via the refactor menu shortcut, but that menu lacks the Type Annotation quick fix.

Impact:

  • Forces manual addition of type annotations

  • Reduces code quality as developers may skip adding types due to the extra effort

  • Makes the IDE less useful compared to VSCode for Dart development

Environment:

  • OS: macOS 24.5.0

  • Cursor Version: [current version]

  • Project Type: Flutter/Dart

Additional Notes:

This was working correctly in VSCode before switching to Cursor. The type annotation quick fix is particularly important for Dart development as it helps maintain type safety and code quality.