Skip to content

[material_ui] Remove unused parameters from constructors of generic test class - #12629

Closed
srawlins wants to merge 4 commits into
flutter:mainfrom
srawlins:unused-mat-2
Closed

srawlins wants to merge 4 commits into
flutter:mainfrom
srawlins:unused-mat-2

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.

Pre-Review Checklist

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

…est class

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.
@srawlins srawlins added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Aug 26, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 26, 2026
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Aug 26, 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 updates the _CustomPageRoute class in packages/material_ui/test/scaffold_test.dart by removing the maintainState parameter from its constructor and instead overriding the maintainState getter to always return true. There are no review comments, and I have no feedback to provide.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Why were override labels added to this PR? The tooling should not flag a test/-only change as needing either a changelog or a version bump.

@srawlins srawlins removed override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Aug 27, 2026
@srawlins

Copy link
Copy Markdown
Contributor Author

They were added because I didn't think any versioning was needed, nor any changelog.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Thanks, I was just surprised to see the labels on a PR that said it was only changing test code, so I wanted to make sure there wasn't a tooling bug. Generally we add the labels only to actually override the tooling when its heuristic is incorrect.

@elliette elliette left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

pull Bot pushed a commit to SaintPatricks-Github-Coinpot-Club/flutter that referenced this pull request Sep 3, 2026
… class (flutter#191764)

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#12629
 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
 

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
@QuncCccccc

Copy link
Copy Markdown
Contributor

Could you help fix the conflict and the failed Dashboard Checks?

@srawlins

srawlins commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

OK fixed conflicts a second time.

@srawlins srawlins closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants