Skip to content

Reduce reliance on Material in page_transitions_test.dart#181467

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
navaronbracke:page_transitions_test_no_material
Feb 3, 2026
Merged

Reduce reliance on Material in page_transitions_test.dart#181467
auto-submit[bot] merged 4 commits into
flutter:masterfrom
navaronbracke:page_transitions_test_no_material

Conversation

@navaronbracke

Copy link
Copy Markdown
Contributor

This PR reduces the reliance on Material in page_transitions_test.dart but does not entirely remove it.

  1. Moves a test for persistent bottom sheet to the right file
  2. Fixes a use of sync* (not sure why this is not caught by dev/bots/analyze.dart, that does check for sync* cc @Piinks )
  3. Replaces some easy usages of Material widgets with its widget counterparts.

The only thing that I did not yet fix is replacing MaterialApp in this file. That probably needs @victorsanni 's work on page transitions to be addressed first?

Part of #177415

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jan 25, 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 effectively reduces the reliance on the Material library in page_transitions_test.dart by replacing Material-specific widgets like Scaffold and MaterialPageRoute with their more generic counterparts from the widgets library. It also correctly moves a test for persistent bottom sheets into persistent_bottom_sheet_test.dart and simplifies a generator function. The changes are well-aligned with the goal of modularizing the framework. I've added a couple of suggestions to improve type safety for GlobalKeys in the newly added test, which will make the code cleaner and more robust.

Comment thread packages/flutter/test/material/persistent_bottom_sheet_test.dart Outdated
Comment thread packages/flutter/test/material/persistent_bottom_sheet_test.dart Outdated
@dkwingsmt dkwingsmt requested a review from justinmc January 28, 2026 19:26

@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 👍

@AbdeMohlbi AbdeMohlbi self-requested a review February 2, 2026 23:10
@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 2, 2026
@auto-submit

auto-submit Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/181467, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 2, 2026
@navaronbracke navaronbracke force-pushed the page_transitions_test_no_material branch from afb1d96 to 913ef22 Compare February 3, 2026 07:05
@navaronbracke

navaronbracke commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased to make the autosubmit bot happy. Once green again, can someone re-add the label?

@AbdeMohlbi

Copy link
Copy Markdown
Member

Rebased to make the autosubmit bot happy. Once green again, can someone re-add the label?

I'll check on it again

@navaronbracke

Copy link
Copy Markdown
Contributor Author

@AbdeMohlbi Looks to be green now.

@AbdeMohlbi AbdeMohlbi added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 3, 2026
@AbdeMohlbi

Copy link
Copy Markdown
Member

@AbdeMohlbi Looks to be green now.

Done

@auto-submit auto-submit Bot added this pull request to the merge queue Feb 3, 2026
Merged via the queue into flutter:master with commit 329d54b Feb 3, 2026
73 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 3, 2026
@navaronbracke navaronbracke deleted the page_transitions_test_no_material branch February 3, 2026 09:34
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Feb 3, 2026
flutter/flutter@c305f1f...bf701fe

2026-02-03 engine-flutter-autoroll@skia.org Roll Dart SDK from 01ba84eeb32f to 56294a92d5cc (2 revisions) (flutter/flutter#181851)
2026-02-03 brackenavaron@gmail.com Remove material from scrollable_helpers_test.dart (flutter/flutter#181460)
2026-02-03 brackenavaron@gmail.com Reduce reliance on Material in page_transitions_test.dart (flutter/flutter#181467)
2026-02-03 116356835+AbdeMohlbi@users.noreply.github.com Fix todo about `replacing URL with constants` in `gradle_errors.dart` (flutter/flutter#181673)
2026-02-03 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1L4m9qCikk-JzrNWE... to UmQaaNuhkiuE8Dzug... (flutter/flutter#181841)
2026-02-03 engine-flutter-autoroll@skia.org Roll Dart SDK from 1aa8f2de7587 to 01ba84eeb32f (2 revisions) (flutter/flutter#181836)
2026-02-03 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#181738)
2026-02-03 brackenavaron@gmail.com Remove material from slivers_appbar_floating_pinned_test.dart + slivers_appbar_stretch_test.dart + sliver_persistent_header_test.dart + slivers_appbar_floating_test.dart (flutter/flutter#181469)
2026-02-02 engine-flutter-autoroll@skia.org Roll Skia from 43fa79e1c51f to f37a22506eb4 (1 revision) (flutter/flutter#181814)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@victorsanni

Copy link
Copy Markdown
Contributor

replacing MaterialApp in this file.

The MaterialApp tests verify that the page transitions builders can be supplied to MaterialApp.theme.pageTransitionsTheme. So they can be moved to Material.

@navaronbracke

Copy link
Copy Markdown
Contributor Author

I'll do that next then, thanks!

LongCatIsLooong pushed a commit to LongCatIsLooong/flutter that referenced this pull request Feb 6, 2026
…1467)

This PR reduces the reliance on Material in page_transitions_test.dart
but does not entirely remove it.

1) Moves a test for persistent bottom sheet to the right file
2) Fixes a use of `sync*` (not sure why this is not caught by
dev/bots/analyze.dart, that _does_ check for `sync*` cc @Piinks )
3) Replaces some easy usages of Material widgets with its widget
counterparts.

The only thing that I did not yet fix is replacing `MaterialApp` in this
file. That probably needs @victorsanni 's work on page transitions to be
addressed first?

Part of flutter#177415

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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
flutter-zl pushed a commit to flutter-zl/flutter that referenced this pull request Feb 10, 2026
…1467)

This PR reduces the reliance on Material in page_transitions_test.dart
but does not entirely remove it.

1) Moves a test for persistent bottom sheet to the right file
2) Fixes a use of `sync*` (not sure why this is not caught by
dev/bots/analyze.dart, that _does_ check for `sync*` cc @Piinks )
3) Replaces some easy usages of Material widgets with its widget
counterparts.

The only thing that I did not yet fix is replacing `MaterialApp` in this
file. That probably needs @victorsanni 's work on page transitions to be
addressed first?

Part of flutter#177415

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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
rickhohler pushed a commit to rickhohler/flutter that referenced this pull request Feb 19, 2026
…1467)

This PR reduces the reliance on Material in page_transitions_test.dart
but does not entirely remove it.

1) Moves a test for persistent bottom sheet to the right file
2) Fixes a use of `sync*` (not sure why this is not caught by
dev/bots/analyze.dart, that _does_ check for `sync*` cc @Piinks )
3) Replaces some easy usages of Material widgets with its widget
counterparts.

The only thing that I did not yet fix is replacing `MaterialApp` in this
file. That probably needs @victorsanni 's work on page transitions to be
addressed first?

Part of flutter#177415

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…#10957)

flutter/flutter@c305f1f...bf701fe

2026-02-03 engine-flutter-autoroll@skia.org Roll Dart SDK from 01ba84eeb32f to 56294a92d5cc (2 revisions) (flutter/flutter#181851)
2026-02-03 brackenavaron@gmail.com Remove material from scrollable_helpers_test.dart (flutter/flutter#181460)
2026-02-03 brackenavaron@gmail.com Reduce reliance on Material in page_transitions_test.dart (flutter/flutter#181467)
2026-02-03 116356835+AbdeMohlbi@users.noreply.github.com Fix todo about `replacing URL with constants` in `gradle_errors.dart` (flutter/flutter#181673)
2026-02-03 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1L4m9qCikk-JzrNWE... to UmQaaNuhkiuE8Dzug... (flutter/flutter#181841)
2026-02-03 engine-flutter-autoroll@skia.org Roll Dart SDK from 1aa8f2de7587 to 01ba84eeb32f (2 revisions) (flutter/flutter#181836)
2026-02-03 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#181738)
2026-02-03 brackenavaron@gmail.com Remove material from slivers_appbar_floating_pinned_test.dart + slivers_appbar_stretch_test.dart + sliver_persistent_header_test.dart + slivers_appbar_floating_test.dart (flutter/flutter#181469)
2026-02-02 engine-flutter-autoroll@skia.org Roll Skia from 43fa79e1c51f to f37a22506eb4 (1 revision) (flutter/flutter#181814)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants