refactor: remove material import from animated_cross_fade, physical_model_test, pinned_header_sliver_test, spell_check_test#183234
Conversation
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
- 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)
fcb6ae2 to
0165e1f
Compare
|
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 Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
victorsanni
left a comment
There was a problem hiding this comment.
Thanks for the work here!
justinmc
left a comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
…odel_test, pinned_header_sliver_test, spell_check_test
0165e1f to
aefcced
Compare
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
00753c3 to
ab86d71
Compare
ab86d71 to
84ef0ba
Compare
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
…physical_model_test, pinned_header_sliver_test, spell_check_test (flutter/flutter#183234)
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
…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.
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
///).