Skip to content

Remove recommendation to always use const for performance optimization - #13979

Merged
jesskuras merged 1 commit into
flutter:mainfrom
jesskuras:remove-const-perf-recommendation
Oct 14, 2026
Merged

jesskuras merged 1 commit into
flutter:mainfrom
jesskuras:remove-const-perf-recommendation

Conversation

@jesskuras

Copy link
Copy Markdown
Contributor

Description of what this PR is changing or adding, and why:

Removes the recommendation on the Flutter performance best practices page (/perf/best-practices) to always use const constructors on widgets as much as possible for performance optimization, along with the unused flutter_lints reference links and parenthetical mention of const constructors.

Issues fixed by this PR (if any):

N/A

PRs or commits this PR depends on (if any):

None

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@jesskuras
jesskuras requested review from a team and sfshaza2 as code owners October 13, 2026 20:35

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the performance best practices documentation in best-practices.md by removing the recommendation to use const constructors on widgets, as well as the references to the flutter_lints package and its migration guide. There are no review comments, so I have no feedback to provide.

@flutter-website-bot

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit de33608):

https://flutter-docs-prod--docs-pr13979-remove-const-perf-reco-n1k77du1.web.app

@abdallahshaban557 abdallahshaban557 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jesskuras
jesskuras merged commit d449fad into flutter:main Oct 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants