Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other Builder Flutter wrappers #60348

Open
FMorschel opened this issue Mar 18, 2025 · 5 comments
Open

Other Builder Flutter wrappers #60348

FMorschel opened this issue Mar 18, 2025 · 5 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-assist Issues with analysis server assists P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@FMorschel
Copy link
Contributor

We have this issue opened on the Flutter-IntelliJ tracker:

Now that #60075 (comment) was closed and we have a single API for creating the Builder-wrappers, what does the Dev-Exp team say about also adding AnimatedBuilder and LayoutBuilder?

If you dislike the idea, both this and that issue can be closed.

CC @bwilkerson

@bwilkerson
Copy link
Member

I don't use Flutter on a daily basis so I don't remember, but how many of the 13 existing wrap-with assists show up for an "average" widget? I ask because I have concerns about having the list get too long.

@kenzieschmoll In case you have thoughts about this as well.

@bwilkerson bwilkerson added devexp-assist Issues with analysis server assists area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. labels Mar 18, 2025
@FMorschel
Copy link
Contributor Author

FMorschel commented Mar 18, 2025

how many of the 13 existing wrap-with assists show up for an "average" widget?

All of them. They each may have a specific case to not show up. E.g:

  • Expanded will not show when the immediate parent (not inside a closure) is not a Flex (Column/Row).
  • After the above-mentioned issue was closed, all Builder-like wrappers will show up when the wrapped widget is not a plain Builder.
  • Some other rules for each.

Image


Edit: Take a look at this comment #56265 (comment) from @DanTup too. On VS Code at least, we can write down the name of the widget to find it faster.

@bwilkerson
Copy link
Member

The ability to jump to an item is interesting, but not very discoverable. I have to wonder how many users know about it.

Makes me wonder whether we should alphabetize these actions to make it easier to scan the list.

I also realized that the number of assists we have impacts performance, because we ask each one whether it applies to the cursor position every time the cursor moves. It should be fast to return without generating an assist, but it still potentially has some impact. (We're working now to try to quantify the impact so we know whether it's a real issue in practice.)

@kenzieschmoll
Copy link
Contributor

I have concerns about having the list get too long

I also share this concern. @bwilkerson do we have analytics on how often the current wrap options are being used? I think we should decide on some maximum number of assists and prioritize support for assists that are used frequently.

That being said, I do see the value in LayoutBuilder and AnimatedBuilder. I really wish we could have drop down menu ("Wrap with Builder >") that exposed all the builders we support, but I think we are limited by the IDE.

@bwilkerson
Copy link
Member

do we have analytics on how often the current wrap options are being used?

We do. We can discuss off-line.

I think we should decide on some maximum number of assists and prioritize support for assists that are used frequently.

I agree in general, but we have to remember that there's a lag. There are several new wrap-with assists that haven't yet made it to stable, and after they do it will still take time for users to migrate forward. Until that happens they will appear to be less frequently used because not enough users are able to use them.

... but I think we are limited by the IDE.

Yes, we are. We should discuss this off-line as well.

@pq pq added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-assist Issues with analysis server assists P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants