Skip to content

refactor: remove material import from animated_cross_fade, physical_model_test, pinned_header_sliver_test, spell_check_test#183234

Merged
auto-submit[bot] merged 3 commits intoflutter:masterfrom
rkishan516:simple-cross-imports-5
Mar 7, 2026
Merged

refactor: remove material import from animated_cross_fade, physical_model_test, pinned_header_sliver_test, spell_check_test#183234
auto-submit[bot] merged 3 commits intoflutter:masterfrom
rkishan516:simple-cross-imports-5

Conversation

@rkishan516
Copy link
Contributor

This PR removes Material imports from animated_cross_fade, physical_model_test, pinned_header_sliver_test, spell_check_test.

part of: #177415

Pre-launch Checklist

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

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Mar 4, 2026
Copy link
Contributor

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

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 refactors several test files to remove dependencies on the material library, which is a good cleanup effort. The changes primarily involve replacing Material widgets like MaterialApp, Scaffold, TextButton, and Material with their non-Material or test-specific equivalents such as TestWidgetsApp, TestButton, and PhysicalModel. The changes look correct and effectively achieve the goal of the PR. I have one minor suggestion for improving code consistency.

misspelledTextStyle = TextField.materialMisspelledTextStyle;
misspelledTextStyle = const TextStyle(
decoration: TextDecoration.underline,
decorationColor: Color(0xFFFF0000),
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and avoid magic numbers, consider extracting Color(0xFFFF0000) into a top-level constant. This would also align with the approach taken in physical_model_test.dart within this same pull request, where _debugRed is used.

References
  1. Effective Dart recommends avoiding literal values that may be duplicated. Extracting this color to a named constant would improve readability and maintainability, especially since this color is used in other test files. (link)

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #183234 at sha 0165e1f

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Mar 4, 2026
Copy link
Contributor

@victorsanni victorsanni left a comment

Choose a reason for hiding this comment

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

Thanks for the work here!

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

The PhysicalModel golden test is failing, see my idea for fixing it below. It's not a big deal because the test shouldn't care about the color, so I'm ok with just approving it as well if we're sure the color is the only relevant change.

child: Row(
children: <Widget>[
PhysicalModel(
color: _debugRed,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you try changing the red color to black and see if that makes the goldens any better, or was there another reason you made it red?

@rkishan516 rkishan516 force-pushed the simple-cross-imports-5 branch from 0165e1f to aefcced Compare March 5, 2026 23:51
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #183234 at sha aefcced

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #183234 at sha 00753c3

@rkishan516 rkishan516 force-pushed the simple-cross-imports-5 branch from 00753c3 to ab86d71 Compare March 7, 2026 13:43
@rkishan516 rkishan516 force-pushed the simple-cross-imports-5 branch from ab86d71 to 84ef0ba Compare March 7, 2026 14:01
@rkishan516 rkishan516 added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 7, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Mar 7, 2026
Merged via the queue into flutter:master with commit 24d164c Mar 7, 2026
153 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Test cross-imports Review Queue Mar 7, 2026
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2026
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2026
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
@rkishan516 rkishan516 deleted the simple-cross-imports-5 branch March 8, 2026 01:46
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2026
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 8, 2026
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 9, 2026
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Mar 9, 2026
flutter/flutter@d182143...2ec61af

2026-03-08 [email protected] Roll Fuchsia Linux SDK from P9D6h4D2ks99Ct7TO... to giLoee6arX5CRHuRh... (flutter/flutter#183366)
2026-03-07 [email protected] Roll Skia from 6643c1bd93bb to af994ae4d990 (1 revision) (flutter/flutter#183359)
2026-03-07 [email protected] refactor: remove material import from animated_cross_fade, physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
2026-03-07 [email protected] Roll Skia from a69ef43650ee to 6643c1bd93bb (13 revisions) (flutter/flutter#183346)
2026-03-07 [email protected] Roll pub packages (flutter/flutter#183344)
2026-03-07 [email protected] Roll Dart SDK from 0c24edc41e09 to 1604910613c7 (2 revisions) (flutter/flutter#183342)
2026-03-07 [email protected] Roll Fuchsia Test Scripts from nR2ESa1Gd8yPcWo06... to R2EllDf4DgBXVNuiN... (flutter/flutter#183341)
2026-03-07 [email protected] Support BGRA textures in BlitCopyTextureToBufferCommandGLES::Encode and fix improper mapping of BGRA to RGBA in blit_command_gles and texture_gles (flutter/flutter#182397)
2026-03-06 [email protected] Roll Fuchsia Linux SDK from 8ay15_eQOEgPHCypm... to P9D6h4D2ks99Ct7TO... (flutter/flutter#183329)
2026-03-06 [email protected] [doc]add discord channel to ios triage meeting (flutter/flutter#183285)
2026-03-06 [email protected] Roll Dart SDK from 7c7c1e3d024d to 0c24edc41e09 (2 revisions) (flutter/flutter#183328)
2026-03-06 [email protected] Revert "Make HCPP upgrading work for vd/tlhc (#181024)" (flutter/flutter#183310)
2026-03-06 [email protected] Add AI contribution guidelines (flutter/flutter#183326)
2026-03-06 [email protected] [Impeller] Do not wait for a frame's acquire fence if the frame was never presented (flutter/flutter#183288)
2026-03-06 [email protected] Add back in accidentally removed line from `create_updated_flutter_deps.py` (flutter/flutter#183314)
2026-03-06 [email protected] Fix typo in README (flutter/flutter#183245)
2026-03-06 [email protected] Roll pub packages (flutter/flutter#183319)
2026-03-06 [email protected] Add displayCornerRadii support to predictive back transitions. (flutter/flutter#181326)
2026-03-06 [email protected] refactor: remove material from widget_inspector_test, sliver_cross_axis_group_test, editable_text_show_on_screen_test, scrollable_fling_test, selection_container_test (flutter/flutter#182702)

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 [email protected],[email protected] 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
xxxOVALxxx pushed a commit to xxxOVALxxx/flutter that referenced this pull request Mar 10, 2026
…odel_test, pinned_header_sliver_test, spell_check_test (flutter#183234)

This PR removes Material imports from animated_cross_fade,
physical_model_test, pinned_header_sliver_test, spell_check_test.

part of: flutter#177415

## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

Development

Successfully merging this pull request may close these issues.

4 participants