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

Proposal: avoid Container objects in the framework #147431

Open
nate-thegrate opened this issue Apr 26, 2024 · 1 comment
Open

Proposal: avoid Container objects in the framework #147431

nate-thegrate opened this issue Apr 26, 2024 · 1 comment
Assignees
Labels
c: proposal A detailed proposal for a change to Flutter framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@nate-thegrate
Copy link
Member

Containers have suboptimal performance; there are several linter rules that recommend not using them when you can avoid it.


Ideally, I would like two things to happen:

  • Add a section to the style guide to advise against using Container objects
  • Refactor the containers currently in the repository into other widget types.
@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team framework flutter/packages/flutter repository. See also f: labels. c: proposal A detailed proposal for a change to Flutter team-framework Owned by Framework team and removed in triage Presently being triaged by the triage team labels Apr 29, 2024
@goderbauer goderbauer added P3 Issues that are less important to the Flutter project triaged-framework Triaged by Framework team labels Apr 30, 2024
@nate-thegrate nate-thegrate self-assigned this May 3, 2024
@nate-thegrate
Copy link
Member Author

nate-thegrate commented May 3, 2024

Even though technically I'm able to update the style guide now, I'm going to hold off, since Containers are the only good option for a couple of things:

  • Specifying a decoration with a clipBehavior
  • Automatically applying a decoration's intrinsic padding

nate-thegrate added a commit that referenced this issue May 9, 2024
This pull request aims to make the Flutter framework more efficient,
based on issue #147431.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: proposal A detailed proposal for a change to Flutter framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
Development

No branches or pull requests

3 participants