Sitelet https://github.com/flutter/flutter/pull/191399
Skip to content

[material] Remove unused parameters from constructors of generic classes - #191399

Merged
srawlins merged 1 commit into
flutter:masterfrom
srawlins:unused-p-mat
Aug 25, 2026
Merged

srawlins merged 1 commit into
flutter:masterfrom
srawlins:unused-p-mat

Conversation

@srawlins

Copy link
Copy Markdown
Contributor

We already don't allow unused parameters from non-generic classes. There was a bug preventing us from reporting such parameters on generic classes.

This is work towards dart-lang/sdk#47839

This is mirrored at flutter/packages#12458

Pre-launch Checklist

…lasses.

We already don't allow unused parameters from non-generic classes. There was a bug preventing us from reporting such parameters on generic classes.

This is work towards dart-lang/sdk#47839

This is mirrored at flutter/packages#12458
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 20, 2026
@github-actions

Copy link
Copy Markdown

This pull request contains changes to Material or Cupertino, which are currently frozen in this repository.

Changes should be made in material_ui and/or cupertino_ui in the flutter/packages repository.

Please refer to #188444 for instructions.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages labels Aug 20, 2026

@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 cleans up several constructors across the Material library by removing unused super.key parameters from private widgets, including _AutocompleteOptions, _ModalBottomSheet, _DropdownMenuItemButton, _DropdownMenu, _DropdownRoutePage, _MenuItem, _PopupMenu, and _SegmentedButtonRenderWidget. Additionally, in DropdownButton._formField, the underline and menuWidth parameters are removed and explicitly initialized to null, and the _CustomPageRoute constructor in the scaffold tests is simplified. There are no review comments, and I have no feedback to provide.

@srawlins

Copy link
Copy Markdown
Contributor Author

flutter/packages#12458 has landed.

@srawlins srawlins added the override code freeze Override an active code freeze. label Aug 25, 2026

@justinmc justinmc 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 👍 . This code is frozen but I assume that linting tools will complain if we don't make this change. Given that it should have no effect on users at all, I think it's fine to land.

@srawlins
srawlins added this pull request to the merge queue Aug 25, 2026
Merged via the queue into flutter:master with commit 14002a4 Aug 25, 2026
26 of 28 checks passed
@srawlins
srawlins deleted the unused-p-mat branch August 25, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD framework flutter/packages/flutter repository. See also f: labels. override code freeze Override an active code freeze. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants