Skip to content

refactor: remove material in pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test#182699

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

refactor: remove material in pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test#182699
auto-submit[bot] merged 2 commits intoflutter:masterfrom
rkishan516:simple-cross-imports-3

Conversation

@rkishan516
Copy link
Contributor

@rkishan516 rkishan516 commented Feb 21, 2026

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

  • 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. f: routes Navigator, Router, and related APIs. labels Feb 21, 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

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.

Comment on lines 500 to 501
// ModalRoute - builds 2
// GlowingOverscrollIndicator - builds 2
// TwoDimensionalChildListDelegate - builds 1 unless addRepaintBoundaries is false
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

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).

Suggested change
// 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

isA<PageRoute<void>>(),
);
switch (defaultTargetPlatform) {
case TargetPlatform.android:
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like logic is changing here, why is changing the implementation of expectModalRoute insufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have tests for all these, should they be added in a separate PR with tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, can do that.

@rkishan516 rkishan516 force-pushed the simple-cross-imports-3 branch 4 times, most recently from 352f311 to 8bdd5f8 Compare February 24, 2026 15:34
@rkishan516 rkishan516 moved this from Todo to In Progress in Test cross-imports Review Queue Feb 24, 2026
@rkishan516 rkishan516 force-pushed the simple-cross-imports-3 branch 2 times, most recently from 9607392 to 553161a Compare February 26, 2026 03:13

class KeepAliveCheckBoxState extends State<KeepAliveCheckBox> with AutomaticKeepAliveClientMixin {
class KeepAliveCheckBoxState extends State<KeepAliveCheckBox>
with TickerProviderStateMixin, ToggleableStateMixin, AutomaticKeepAliveClientMixin {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need TickerProviderStateMixin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yaa, ToggleableStateMixin depends on it.

}
}

class _NoOpToggleablePainter extends ToggleablePainter {
Copy link
Contributor

Choose a reason for hiding this comment

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

Weird we have to reimplement this. But I'm ok with leaving as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because didn't wanted to paint anything.

}
}

class _NoOpToggleablePainter extends ToggleablePainter {
Copy link
Contributor

Choose a reason for hiding this comment

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

ToggleablePainter is a ChangeNotifier, so subclasses will have to be disposed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, updating.

@rkishan516 rkishan516 force-pushed the simple-cross-imports-3 branch from 553161a to 6ac5567 Compare March 3, 2026 03:22
@rkishan516 rkishan516 added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 4, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Mar 4, 2026
Merged via the queue into flutter:master with commit b9b5048 Mar 4, 2026
152 of 153 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Test cross-imports Review Queue Mar 4, 2026
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 4, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 4, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 4, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 4, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 4, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 4, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 4, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 5, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 5, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 5, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 5, 2026
…tion_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Mar 5, 2026
Roll Flutter from 46fb7210422d to d3dd7744e81f (33 revisions)

flutter/flutter@46fb721...d3dd774

2026-03-04 [email protected] Show warning when plugins do not support SwiftPM (flutter/flutter#182506)
2026-03-04 [email protected] Give guided message when project is not compatible with SwiftPM (flutter/flutter#182394)
2026-03-04 [email protected] Pass --web-define through to web runner when using --machine mode (flutter/flutter#183228)
2026-03-04 [email protected] Improve SwiftPM minimum platform mismatch diagnostics (flutter/flutter#182375)
2026-03-04 [email protected] Use dart::bin::SetupDartIo to setup dart:io (flutter/flutter#176714)
2026-03-04 [email protected] Roll Skia from 3197848b14ad to ada0b7628c79 (5 revisions) (flutter/flutter#183221)
2026-03-04 [email protected] Roll Skia from fe9e9f22c531 to 3197848b14ad (15 revisions) (flutter/flutter#183198)
2026-03-04 [email protected] 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 [email protected] refactor: remove material in pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699)
2026-03-04 [email protected] Add dev/benchmarks/README.md (flutter/flutter#182976)
2026-03-03 [email protected] Roll RapidJSON to a branch based on the current upstream head (flutter/flutter#183048)
2026-03-03 [email protected] [Impeller] Update comments to reflect new info about 2-pass rendering (flutter/flutter#183050)
2026-03-03 [email protected] Add vmservices for accessibilityEvaluation (flutter/flutter#182791)
2026-03-03 [email protected] Roll Fuchsia Linux SDK from 0dCDM2oORHwDf_pyb... to JJw5EJ87vLGqFVl4h... (flutter/flutter#183177)
2026-03-03 [email protected] Support mixed color spaces in `Color.lerp` (flutter/flutter#182934)
2026-03-03 [email protected] Add warning when there is a widget with color between `Material` and `ListTile` (flutter/flutter#181402)
2026-03-03 [email protected] [ios]uitest for admob banner in scrollable list gesture issue (flutter/flutter#183128)
2026-03-03 [email protected] Roll Packages from faa4e22 to 9083bc9 (4 revisions) (flutter/flutter#183164)
2026-03-03 [email protected] Build App and native asset frameworks for Add to App FlutterPluginRegistrant (flutter/flutter#183136)
2026-03-03 [email protected] Roll Skia from f886711f180d to fe9e9f22c531 (4 revisions) (flutter/flutter#183155)
2026-03-03 [email protected] Roll Dart SDK from e86dbe9aa742 to c597ef90d2dc (2 revisions) (flutter/flutter#183147)
2026-03-03 [email protected] fix: bump matcher (flutter/flutter#183167)
2026-03-02 [email protected] Use isA to test for exceptions (flutter/flutter#183129)
2026-03-02 [email protected] [two_dimensional_scrollables] Fix tableview janks when first row/column pinned (flutter/flutter#180563)
2026-03-02 [email protected] Add await to callsites of BasicMessageChannel.send (flutter/flutter#182868)
2026-03-02 [email protected] Roll pub packages (flutter/flutter#183133)
2026-03-02 [email protected] Improve FFI code for windowing (flutter/flutter#183098)
2026-03-02 [email protected] [workflow] Update the changelog merge action to fetch the stable branch (flutter/flutter#183132)
2026-03-02 [email protected] Roll Skia from e180358b7a7a to f886711f180d (2 revisions) (flutter/flutter#183130)
2026-03-02 [email protected] Merge changelog from 3.41.3. (flutter/flutter#183131)
2026-03-02 [email protected] Make TextDecoration final and unify maskValue across platforms (flutter/flutter#183070)
2026-03-02 [email protected] Roll pub packages (flutter/flutter#182640)
2026-03-02 [email protected] 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 [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:
...
@rkishan516 rkishan516 deleted the simple-cross-imports-3 branch March 8, 2026 01:46
xxxOVALxxx pushed a commit to xxxOVALxxx/flutter that referenced this pull request Mar 10, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

Development

Successfully merging this pull request may close these issues.

2 participants