refactor: remove material in pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test#182699
Conversation
There was a problem hiding this comment.
Code Review
The pull request successfully refactors several test files and utilities to remove dependencies on the Material library, replacing them with equivalent components from the base widgets library or custom test implementations. This is a positive change for test modularity and isolation. The grouping of platforms in two_dimensional_viewport_test.dart correctly reflects the default ScrollBehavior of WidgetsApp, which includes GlowingOverscrollIndicator on Android and Fuchsia. I have provided a few suggestions to improve the documentation of magic numbers in tests and a minor optimization in a test utility.
| // ModalRoute - builds 2 | ||
| // GlowingOverscrollIndicator - builds 2 | ||
| // TwoDimensionalChildListDelegate - builds 1 unless addRepaintBoundaries is false |
There was a problem hiding this comment.
The comment explaining the RepaintBoundary count was partially removed, making the magic number 7 for Android and Fuchsia difficult to understand. Since WidgetsApp uses the default ScrollBehavior, which still adds GlowingOverscrollIndicator on these platforms, it would be better to keep and update the comment to accurately reflect the count (which is 4 extra boundaries in a 2D scroll view, 2 per axis).
| // ModalRoute - builds 2 | |
| // GlowingOverscrollIndicator - builds 2 | |
| // TwoDimensionalChildListDelegate - builds 1 unless addRepaintBoundaries is false | |
| // ModalRoute - builds 2 | |
| // GlowingOverscrollIndicator - builds 4 (2 per axis) | |
| // TwoDimensionalChildListDelegate - builds 1 unless addRepaintBoundaries is false |
0ce3352 to
9e434d7
Compare
| isA<PageRoute<void>>(), | ||
| ); | ||
| switch (defaultTargetPlatform) { | ||
| case TargetPlatform.android: |
There was a problem hiding this comment.
Feels like logic is changing here, why is changing the implementation of expectModalRoute insufficient?
There was a problem hiding this comment.
Actually changing to TestWidgetsApp changes more than just the route type — it also changes the
scroll behavior, which affects the widget tree structure.
Material app has MaterialScrollBehavior while TestWidgetsApp uses base ScrollBehavior.
| const TestWidgetsApp({ | ||
| super.key, | ||
| this.navigatorKey, | ||
| this.initialRoute, |
There was a problem hiding this comment.
We should have tests for all these, should they be added in a separate PR with tests?
There was a problem hiding this comment.
Sure, can do that.
352f311 to
8bdd5f8
Compare
9607392 to
553161a
Compare
|
|
||
| class KeepAliveCheckBoxState extends State<KeepAliveCheckBox> with AutomaticKeepAliveClientMixin { | ||
| class KeepAliveCheckBoxState extends State<KeepAliveCheckBox> | ||
| with TickerProviderStateMixin, ToggleableStateMixin, AutomaticKeepAliveClientMixin { |
There was a problem hiding this comment.
Do we need TickerProviderStateMixin?
There was a problem hiding this comment.
Yaa, ToggleableStateMixin depends on it.
| } | ||
| } | ||
|
|
||
| class _NoOpToggleablePainter extends ToggleablePainter { |
There was a problem hiding this comment.
Weird we have to reimplement this. But I'm ok with leaving as-is.
There was a problem hiding this comment.
Because didn't wanted to paint anything.
| } | ||
| } | ||
|
|
||
| class _NoOpToggleablePainter extends ToggleablePainter { |
There was a problem hiding this comment.
ToggleablePainter is a ChangeNotifier, so subclasses will have to be disposed.
…ge_test, two_dimensional_utils, two_dimensional_viewport_test
553161a to
6ac5567
Compare
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
Roll Flutter from 46fb7210422d to d3dd7744e81f (33 revisions) flutter/flutter@46fb721...d3dd774 2026-03-04 15619084+vashworth@users.noreply.github.com Show warning when plugins do not support SwiftPM (flutter/flutter#182506) 2026-03-04 15619084+vashworth@users.noreply.github.com Give guided message when project is not compatible with SwiftPM (flutter/flutter#182394) 2026-03-04 danny@tuppeny.com Pass --web-define through to web runner when using --machine mode (flutter/flutter#183228) 2026-03-04 104147021+MohammedTarigg@users.noreply.github.com Improve SwiftPM minimum platform mismatch diagnostics (flutter/flutter#182375) 2026-03-04 vegorov@google.com Use dart::bin::SetupDartIo to setup dart:io (flutter/flutter#176714) 2026-03-04 engine-flutter-autoroll@skia.org Roll Skia from 3197848b14ad to ada0b7628c79 (5 revisions) (flutter/flutter#183221) 2026-03-04 engine-flutter-autoroll@skia.org Roll Skia from fe9e9f22c531 to 3197848b14ad (15 revisions) (flutter/flutter#183198) 2026-03-04 34465683+rkishan516@users.noreply.github.com refactor: remove material in reorderable_list_test, scroll_notification_test, scroll_physics_test, shortcuts_test, sliver_floating_header_test, snapshot_widget_test (flutter/flutter#182698) 2026-03-04 34465683+rkishan516@users.noreply.github.com refactor: remove material in pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699) 2026-03-04 737941+loic-sharma@users.noreply.github.com Add dev/benchmarks/README.md (flutter/flutter#182976) 2026-03-03 jason-simmons@users.noreply.github.com Roll RapidJSON to a branch based on the current upstream head (flutter/flutter#183048) 2026-03-03 flar@google.com [Impeller] Update comments to reflect new info about 2-pass rendering (flutter/flutter#183050) 2026-03-03 47866232+chunhtai@users.noreply.github.com Add vmservices for accessibilityEvaluation (flutter/flutter#182791) 2026-03-03 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 0dCDM2oORHwDf_pyb... to JJw5EJ87vLGqFVl4h... (flutter/flutter#183177) 2026-03-03 lukas.klingsbo@gmail.com Support mixed color spaces in `Color.lerp` (flutter/flutter#182934) 2026-03-03 36861262+QuncCccccc@users.noreply.github.com Add warning when there is a widget with color between `Material` and `ListTile` (flutter/flutter#181402) 2026-03-03 41930132+hellohuanlin@users.noreply.github.com [ios]uitest for admob banner in scrollable list gesture issue (flutter/flutter#183128) 2026-03-03 engine-flutter-autoroll@skia.org Roll Packages from faa4e22 to 9083bc9 (4 revisions) (flutter/flutter#183164) 2026-03-03 15619084+vashworth@users.noreply.github.com Build App and native asset frameworks for Add to App FlutterPluginRegistrant (flutter/flutter#183136) 2026-03-03 engine-flutter-autoroll@skia.org Roll Skia from f886711f180d to fe9e9f22c531 (4 revisions) (flutter/flutter#183155) 2026-03-03 engine-flutter-autoroll@skia.org Roll Dart SDK from e86dbe9aa742 to c597ef90d2dc (2 revisions) (flutter/flutter#183147) 2026-03-03 codefu@google.com fix: bump matcher (flutter/flutter#183167) 2026-03-02 58529443+srujzs@users.noreply.github.com Use isA to test for exceptions (flutter/flutter#183129) 2026-03-02 dpxhfxywang@163.com [two_dimensional_scrollables] Fix tableview janks when first row/column pinned (flutter/flutter#180563) 2026-03-02 victorsanniay@gmail.com Add await to callsites of BasicMessageChannel.send (flutter/flutter#182868) 2026-03-02 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183133) 2026-03-02 robert.ancell@canonical.com Improve FFI code for windowing (flutter/flutter#183098) 2026-03-02 kevinjchisholm@google.com [workflow] Update the changelog merge action to fetch the stable branch (flutter/flutter#183132) 2026-03-02 engine-flutter-autoroll@skia.org Roll Skia from e180358b7a7a to f886711f180d (2 revisions) (flutter/flutter#183130) 2026-03-02 jacksongardner@google.com Merge changelog from 3.41.3. (flutter/flutter#183131) 2026-03-02 50985133+SpiralMomentum@users.noreply.github.com Make TextDecoration final and unify maskValue across platforms (flutter/flutter#183070) 2026-03-02 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#182640) 2026-03-02 15619084+vashworth@users.noreply.github.com Enable SwiftPM by default on master and beta (flutter/flutter#182923) 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 bmparr@google.com,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: ...
…ge_test, two_dimensional_utils, two_dimensional_viewport_test (flutter#182699) This PR removes Material imports from pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test. part of: flutter#177415 depends on: flutter#182805 ## 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.
…r#11182) Roll Flutter from 46fb7210422d to d3dd7744e81f (33 revisions) flutter/flutter@46fb721...d3dd774 2026-03-04 15619084+vashworth@users.noreply.github.com Show warning when plugins do not support SwiftPM (flutter/flutter#182506) 2026-03-04 15619084+vashworth@users.noreply.github.com Give guided message when project is not compatible with SwiftPM (flutter/flutter#182394) 2026-03-04 danny@tuppeny.com Pass --web-define through to web runner when using --machine mode (flutter/flutter#183228) 2026-03-04 104147021+MohammedTarigg@users.noreply.github.com Improve SwiftPM minimum platform mismatch diagnostics (flutter/flutter#182375) 2026-03-04 vegorov@google.com Use dart::bin::SetupDartIo to setup dart:io (flutter/flutter#176714) 2026-03-04 engine-flutter-autoroll@skia.org Roll Skia from 3197848b14ad to ada0b7628c79 (5 revisions) (flutter/flutter#183221) 2026-03-04 engine-flutter-autoroll@skia.org Roll Skia from fe9e9f22c531 to 3197848b14ad (15 revisions) (flutter/flutter#183198) 2026-03-04 34465683+rkishan516@users.noreply.github.com refactor: remove material in reorderable_list_test, scroll_notification_test, scroll_physics_test, shortcuts_test, sliver_floating_header_test, snapshot_widget_test (flutter/flutter#182698) 2026-03-04 34465683+rkishan516@users.noreply.github.com refactor: remove material in pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699) 2026-03-04 737941+loic-sharma@users.noreply.github.com Add dev/benchmarks/README.md (flutter/flutter#182976) 2026-03-03 jason-simmons@users.noreply.github.com Roll RapidJSON to a branch based on the current upstream head (flutter/flutter#183048) 2026-03-03 flar@google.com [Impeller] Update comments to reflect new info about 2-pass rendering (flutter/flutter#183050) 2026-03-03 47866232+chunhtai@users.noreply.github.com Add vmservices for accessibilityEvaluation (flutter/flutter#182791) 2026-03-03 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 0dCDM2oORHwDf_pyb... to JJw5EJ87vLGqFVl4h... (flutter/flutter#183177) 2026-03-03 lukas.klingsbo@gmail.com Support mixed color spaces in `Color.lerp` (flutter/flutter#182934) 2026-03-03 36861262+QuncCccccc@users.noreply.github.com Add warning when there is a widget with color between `Material` and `ListTile` (flutter/flutter#181402) 2026-03-03 41930132+hellohuanlin@users.noreply.github.com [ios]uitest for admob banner in scrollable list gesture issue (flutter/flutter#183128) 2026-03-03 engine-flutter-autoroll@skia.org Roll Packages from faa4e22 to 9083bc9 (4 revisions) (flutter/flutter#183164) 2026-03-03 15619084+vashworth@users.noreply.github.com Build App and native asset frameworks for Add to App FlutterPluginRegistrant (flutter/flutter#183136) 2026-03-03 engine-flutter-autoroll@skia.org Roll Skia from f886711f180d to fe9e9f22c531 (4 revisions) (flutter/flutter#183155) 2026-03-03 engine-flutter-autoroll@skia.org Roll Dart SDK from e86dbe9aa742 to c597ef90d2dc (2 revisions) (flutter/flutter#183147) 2026-03-03 codefu@google.com fix: bump matcher (flutter/flutter#183167) 2026-03-02 58529443+srujzs@users.noreply.github.com Use isA to test for exceptions (flutter/flutter#183129) 2026-03-02 dpxhfxywang@163.com [two_dimensional_scrollables] Fix tableview janks when first row/column pinned (flutter/flutter#180563) 2026-03-02 victorsanniay@gmail.com Add await to callsites of BasicMessageChannel.send (flutter/flutter#182868) 2026-03-02 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183133) 2026-03-02 robert.ancell@canonical.com Improve FFI code for windowing (flutter/flutter#183098) 2026-03-02 kevinjchisholm@google.com [workflow] Update the changelog merge action to fetch the stable branch (flutter/flutter#183132) 2026-03-02 engine-flutter-autoroll@skia.org Roll Skia from e180358b7a7a to f886711f180d (2 revisions) (flutter/flutter#183130) 2026-03-02 jacksongardner@google.com Merge changelog from 3.41.3. (flutter/flutter#183131) 2026-03-02 50985133+SpiralMomentum@users.noreply.github.com Make TextDecoration final and unify maskValue across platforms (flutter/flutter#183070) 2026-03-02 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#182640) 2026-03-02 15619084+vashworth@users.noreply.github.com Enable SwiftPM by default on master and beta (flutter/flutter#182923) 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 bmparr@google.com,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: ...
…ge_test, two_dimensional_utils, two_dimensional_viewport_test (flutter#182699) This PR removes Material imports from pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test. part of: flutter#177415 depends on: flutter#182805 ## 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.
…r#11182) Roll Flutter from 46fb7210422d to d3dd7744e81f (33 revisions) flutter/flutter@46fb721...d3dd774 2026-03-04 15619084+vashworth@users.noreply.github.com Show warning when plugins do not support SwiftPM (flutter/flutter#182506) 2026-03-04 15619084+vashworth@users.noreply.github.com Give guided message when project is not compatible with SwiftPM (flutter/flutter#182394) 2026-03-04 danny@tuppeny.com Pass --web-define through to web runner when using --machine mode (flutter/flutter#183228) 2026-03-04 104147021+MohammedTarigg@users.noreply.github.com Improve SwiftPM minimum platform mismatch diagnostics (flutter/flutter#182375) 2026-03-04 vegorov@google.com Use dart::bin::SetupDartIo to setup dart:io (flutter/flutter#176714) 2026-03-04 engine-flutter-autoroll@skia.org Roll Skia from 3197848b14ad to ada0b7628c79 (5 revisions) (flutter/flutter#183221) 2026-03-04 engine-flutter-autoroll@skia.org Roll Skia from fe9e9f22c531 to 3197848b14ad (15 revisions) (flutter/flutter#183198) 2026-03-04 34465683+rkishan516@users.noreply.github.com refactor: remove material in reorderable_list_test, scroll_notification_test, scroll_physics_test, shortcuts_test, sliver_floating_header_test, snapshot_widget_test (flutter/flutter#182698) 2026-03-04 34465683+rkishan516@users.noreply.github.com refactor: remove material in pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699) 2026-03-04 737941+loic-sharma@users.noreply.github.com Add dev/benchmarks/README.md (flutter/flutter#182976) 2026-03-03 jason-simmons@users.noreply.github.com Roll RapidJSON to a branch based on the current upstream head (flutter/flutter#183048) 2026-03-03 flar@google.com [Impeller] Update comments to reflect new info about 2-pass rendering (flutter/flutter#183050) 2026-03-03 47866232+chunhtai@users.noreply.github.com Add vmservices for accessibilityEvaluation (flutter/flutter#182791) 2026-03-03 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 0dCDM2oORHwDf_pyb... to JJw5EJ87vLGqFVl4h... (flutter/flutter#183177) 2026-03-03 lukas.klingsbo@gmail.com Support mixed color spaces in `Color.lerp` (flutter/flutter#182934) 2026-03-03 36861262+QuncCccccc@users.noreply.github.com Add warning when there is a widget with color between `Material` and `ListTile` (flutter/flutter#181402) 2026-03-03 41930132+hellohuanlin@users.noreply.github.com [ios]uitest for admob banner in scrollable list gesture issue (flutter/flutter#183128) 2026-03-03 engine-flutter-autoroll@skia.org Roll Packages from faa4e22 to 9083bc9 (4 revisions) (flutter/flutter#183164) 2026-03-03 15619084+vashworth@users.noreply.github.com Build App and native asset frameworks for Add to App FlutterPluginRegistrant (flutter/flutter#183136) 2026-03-03 engine-flutter-autoroll@skia.org Roll Skia from f886711f180d to fe9e9f22c531 (4 revisions) (flutter/flutter#183155) 2026-03-03 engine-flutter-autoroll@skia.org Roll Dart SDK from e86dbe9aa742 to c597ef90d2dc (2 revisions) (flutter/flutter#183147) 2026-03-03 codefu@google.com fix: bump matcher (flutter/flutter#183167) 2026-03-02 58529443+srujzs@users.noreply.github.com Use isA to test for exceptions (flutter/flutter#183129) 2026-03-02 dpxhfxywang@163.com [two_dimensional_scrollables] Fix tableview janks when first row/column pinned (flutter/flutter#180563) 2026-03-02 victorsanniay@gmail.com Add await to callsites of BasicMessageChannel.send (flutter/flutter#182868) 2026-03-02 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#183133) 2026-03-02 robert.ancell@canonical.com Improve FFI code for windowing (flutter/flutter#183098) 2026-03-02 kevinjchisholm@google.com [workflow] Update the changelog merge action to fetch the stable branch (flutter/flutter#183132) 2026-03-02 engine-flutter-autoroll@skia.org Roll Skia from e180358b7a7a to f886711f180d (2 revisions) (flutter/flutter#183130) 2026-03-02 jacksongardner@google.com Merge changelog from 3.41.3. (flutter/flutter#183131) 2026-03-02 50985133+SpiralMomentum@users.noreply.github.com Make TextDecoration final and unify maskValue across platforms (flutter/flutter#183070) 2026-03-02 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#182640) 2026-03-02 15619084+vashworth@users.noreply.github.com Enable SwiftPM by default on master and beta (flutter/flutter#182923) 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 bmparr@google.com,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: ...
This PR removes Material imports from pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test.
part of: #177415
depends on: #182805
Pre-launch Checklist
///).