Remove material from ticker mode test#181696
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the dependency on the Material package from ticker_mode_test.dart by enhancing the TestWidgetsApp test helper to support routing. The changes introduce routes and transitionsBuilder properties to TestWidgetsApp, making it a more capable replacement for MaterialApp in tests. The new functionality is well-documented and thoroughly tested in widgets_app_tester_test.dart. The code is clean, correct, and effectively achieves the goal of reducing package dependencies within the test suite. I have no specific comments for improvement.
c9d4c33 to
5b738cb
Compare
5b738cb to
5edd7e7
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors ticker_mode_test.dart to remove its dependency on the Material library. This is achieved by replacing MaterialApp with TestWidgetsApp and updating the imports accordingly. The change is also reflected in check_tests_cross_imports.dart by removing the test from the allow-list. The changes are correct and align with the goal of cleaning up test dependencies. I have one minor suggestion regarding import formatting to align with the Flutter style guide.
| import 'package:flutter/foundation.dart'; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:flutter/scheduler.dart'; | ||
| import 'package:flutter/widgets.dart'; | ||
| import 'package:flutter_test/flutter_test.dart'; |
There was a problem hiding this comment.
According to the Flutter style guide, imports should be grouped by type (dart:, package:flutter/, other package:, and relative imports), with blank lines between groups. Running dart format would add a blank line after the package:flutter/* imports to separate them from other package imports.
| import 'package:flutter/foundation.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/scheduler.dart'; | |
| import 'package:flutter/widgets.dart'; | |
| import 'package:flutter_test/flutter_test.dart'; | |
| import 'package:flutter/foundation.dart'; | |
| import 'package:flutter/scheduler.dart'; | |
| import 'package:flutter/widgets.dart'; | |
| import 'package:flutter_test/flutter_test.dart'; |
References
- All Dart code should be formatted using
dart format, which groups and sorts imports. A blank line should separatepackage:flutter/imports from otherpackage:imports. (link)
This PR removes Material imports from ticker_mode_test.dart. part of: flutter#177415 depends on: flutter#181695 - [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.
…11088) Manual roll Flutter from c023e5b2474f to 91b2d41a66d1 (31 revisions) Manual roll requested by tarrinneal@google.com flutter/flutter@c023e5b...91b2d41 2026-02-19 31859944+LongCatIsLooong@users.noreply.github.com Reland #179643, only scroll hit-testable primary scroll views on status bar tap (flutter/flutter#182391) 2026-02-19 116356835+AbdeMohlbi@users.noreply.github.com Replace References to `flutter/engine` with `flutter/flutter` (flutter/flutter#182600) 2026-02-19 104009581+Saqib198@users.noreply.github.com Remove specific iOS extended attributes to fix code signing (flutter/flutter#180710) 2026-02-19 jason-simmons@users.noreply.github.com Manual roll Skia from 7bbdc51ab0aa to ce5854495a3a (flutter/flutter#182637) 2026-02-19 41930132+hellohuanlin@users.noreply.github.com [pv]add integration test for original untappable web view link behind context menu bug (flutter/flutter#182111) 2026-02-19 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#182579) 2026-02-19 brackenavaron@gmail.com Remove Material import from scroll_view_test.dart (flutter/flutter#181281) 2026-02-19 victorsanniay@gmail.com Add RawTooltip.ignorePointer (flutter/flutter#182527) 2026-02-19 mdebbar@google.com [web] Stop double loading fonts for WebParagraph (flutter/flutter#182026) 2026-02-19 1063596+reidbaker@users.noreply.github.com Migrate abi build paths to use new abi filtering api #AGP9 (flutter/flutter#181828) 2026-02-19 mdebbar@google.com [web] Flutter errors should be reported with console.error() (flutter/flutter#178886) 2026-02-19 engine-flutter-autoroll@skia.org Manual roll Skia from dfe78d132e24 to 7bbdc51ab0aa (8 revisions) (flutter/flutter#182612) 2026-02-19 ahabeeblahi1@gmail.com Refactor autofill_group_test.dart to remove Material dependencies (flutter/flutter#181903) 2026-02-19 engine-flutter-autoroll@skia.org Roll Packages from 59f905c to 9da22bf (8 revisions) (flutter/flutter#182611) 2026-02-19 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from Ihau0pUz3u5ajw42u... to KfPgw04T0OEADLJA5... (flutter/flutter#182607) 2026-02-19 magder@google.com Marks Mac_arm64_mokey entrypoint_dart_registrant unflaky (flutter/flutter#181648) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material from Modal barrier tests (flutter/flutter#181708) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material from ticker mode test (flutter/flutter#181696) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material imports from Inherited Model, Magnifier, SafeArea, UndoHistory, Navigator and Layers test (flutter/flutter#181709) 2026-02-19 161609011+Akshat-Shuklaaa@users.noreply.github.com docs: fix grammar in animation library documentation (flutter/flutter#182461) 2026-02-19 ahmedsameha1@gmail.com Handle#6537 first grouped tests (flutter/flutter#182077) 2026-02-19 ahabeeblahi1@gmail.com Move SelectionArea web test from widgets to material folder (flutter/flutter#181951) 2026-02-19 engine-flutter-autoroll@skia.org Roll Dart SDK from 44895e617182 to 2642761fca94 (6 revisions) (flutter/flutter#182572) 2026-02-19 okorohelijah@google.com Update create template to always generate both SwiftPM and CocoaPods support for iOS/macOS plugins (flutter/flutter#181251) 2026-02-18 74812392+akhil-ge0rge@users.noreply.github.com Fix(Material): DateRangePicker ignores DatePickerTheme.dayShape (flutter/flutter#181658) 2026-02-18 83986256+devnoaman@users.noreply.github.com Fixing ExpansionTile expandedAlignment not Accepts AlignmentGeometry … (flutter/flutter#180814) 2026-02-18 15619084+vashworth@users.noreply.github.com Give guided error message when CocoaPod and SwiftPM dependency conflicts (flutter/flutter#182392) 2026-02-18 brackenavaron@gmail.com Remove material from interactive_viewer_test.dart (flutter/flutter#181465) 2026-02-18 dkwingsmt@users.noreply.github.com Bring Windows misc coverage out of bringup (flutter/flutter#182332) 2026-02-18 34871572+gmackall@users.noreply.github.com Update android symbolication instructions (flutter/flutter#181267) 2026-02-18 34871572+gmackall@users.noreply.github.com Unmark stable vulkan platform view tests as bringup (flutter/flutter#182554) 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,tarrinneal@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 ticker_mode_test.dart. part of: flutter#177415 depends on: flutter#181695 ## 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.
…lutter#11088) Manual roll Flutter from c023e5b2474f to 91b2d41a66d1 (31 revisions) Manual roll requested by tarrinneal@google.com flutter/flutter@c023e5b...91b2d41 2026-02-19 31859944+LongCatIsLooong@users.noreply.github.com Reland #179643, only scroll hit-testable primary scroll views on status bar tap (flutter/flutter#182391) 2026-02-19 116356835+AbdeMohlbi@users.noreply.github.com Replace References to `flutter/engine` with `flutter/flutter` (flutter/flutter#182600) 2026-02-19 104009581+Saqib198@users.noreply.github.com Remove specific iOS extended attributes to fix code signing (flutter/flutter#180710) 2026-02-19 jason-simmons@users.noreply.github.com Manual roll Skia from 7bbdc51ab0aa to ce5854495a3a (flutter/flutter#182637) 2026-02-19 41930132+hellohuanlin@users.noreply.github.com [pv]add integration test for original untappable web view link behind context menu bug (flutter/flutter#182111) 2026-02-19 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#182579) 2026-02-19 brackenavaron@gmail.com Remove Material import from scroll_view_test.dart (flutter/flutter#181281) 2026-02-19 victorsanniay@gmail.com Add RawTooltip.ignorePointer (flutter/flutter#182527) 2026-02-19 mdebbar@google.com [web] Stop double loading fonts for WebParagraph (flutter/flutter#182026) 2026-02-19 1063596+reidbaker@users.noreply.github.com Migrate abi build paths to use new abi filtering api #AGP9 (flutter/flutter#181828) 2026-02-19 mdebbar@google.com [web] Flutter errors should be reported with console.error() (flutter/flutter#178886) 2026-02-19 engine-flutter-autoroll@skia.org Manual roll Skia from dfe78d132e24 to 7bbdc51ab0aa (8 revisions) (flutter/flutter#182612) 2026-02-19 ahabeeblahi1@gmail.com Refactor autofill_group_test.dart to remove Material dependencies (flutter/flutter#181903) 2026-02-19 engine-flutter-autoroll@skia.org Roll Packages from 59f905c to 9da22bf (8 revisions) (flutter/flutter#182611) 2026-02-19 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from Ihau0pUz3u5ajw42u... to KfPgw04T0OEADLJA5... (flutter/flutter#182607) 2026-02-19 magder@google.com Marks Mac_arm64_mokey entrypoint_dart_registrant unflaky (flutter/flutter#181648) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material from Modal barrier tests (flutter/flutter#181708) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material from ticker mode test (flutter/flutter#181696) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material imports from Inherited Model, Magnifier, SafeArea, UndoHistory, Navigator and Layers test (flutter/flutter#181709) 2026-02-19 161609011+Akshat-Shuklaaa@users.noreply.github.com docs: fix grammar in animation library documentation (flutter/flutter#182461) 2026-02-19 ahmedsameha1@gmail.com Handle#6537 first grouped tests (flutter/flutter#182077) 2026-02-19 ahabeeblahi1@gmail.com Move SelectionArea web test from widgets to material folder (flutter/flutter#181951) 2026-02-19 engine-flutter-autoroll@skia.org Roll Dart SDK from 44895e617182 to 2642761fca94 (6 revisions) (flutter/flutter#182572) 2026-02-19 okorohelijah@google.com Update create template to always generate both SwiftPM and CocoaPods support for iOS/macOS plugins (flutter/flutter#181251) 2026-02-18 74812392+akhil-ge0rge@users.noreply.github.com Fix(Material): DateRangePicker ignores DatePickerTheme.dayShape (flutter/flutter#181658) 2026-02-18 83986256+devnoaman@users.noreply.github.com Fixing ExpansionTile expandedAlignment not Accepts AlignmentGeometry … (flutter/flutter#180814) 2026-02-18 15619084+vashworth@users.noreply.github.com Give guided error message when CocoaPod and SwiftPM dependency conflicts (flutter/flutter#182392) 2026-02-18 brackenavaron@gmail.com Remove material from interactive_viewer_test.dart (flutter/flutter#181465) 2026-02-18 dkwingsmt@users.noreply.github.com Bring Windows misc coverage out of bringup (flutter/flutter#182332) 2026-02-18 34871572+gmackall@users.noreply.github.com Update android symbolication instructions (flutter/flutter#181267) 2026-02-18 34871572+gmackall@users.noreply.github.com Unmark stable vulkan platform view tests as bringup (flutter/flutter#182554) 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,tarrinneal@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 ticker_mode_test.dart. part of: flutter#177415 depends on: flutter#181695 ## 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.
…lutter#11088) Manual roll Flutter from c023e5b2474f to 91b2d41a66d1 (31 revisions) Manual roll requested by tarrinneal@google.com flutter/flutter@c023e5b...91b2d41 2026-02-19 31859944+LongCatIsLooong@users.noreply.github.com Reland #179643, only scroll hit-testable primary scroll views on status bar tap (flutter/flutter#182391) 2026-02-19 116356835+AbdeMohlbi@users.noreply.github.com Replace References to `flutter/engine` with `flutter/flutter` (flutter/flutter#182600) 2026-02-19 104009581+Saqib198@users.noreply.github.com Remove specific iOS extended attributes to fix code signing (flutter/flutter#180710) 2026-02-19 jason-simmons@users.noreply.github.com Manual roll Skia from 7bbdc51ab0aa to ce5854495a3a (flutter/flutter#182637) 2026-02-19 41930132+hellohuanlin@users.noreply.github.com [pv]add integration test for original untappable web view link behind context menu bug (flutter/flutter#182111) 2026-02-19 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#182579) 2026-02-19 brackenavaron@gmail.com Remove Material import from scroll_view_test.dart (flutter/flutter#181281) 2026-02-19 victorsanniay@gmail.com Add RawTooltip.ignorePointer (flutter/flutter#182527) 2026-02-19 mdebbar@google.com [web] Stop double loading fonts for WebParagraph (flutter/flutter#182026) 2026-02-19 1063596+reidbaker@users.noreply.github.com Migrate abi build paths to use new abi filtering api #AGP9 (flutter/flutter#181828) 2026-02-19 mdebbar@google.com [web] Flutter errors should be reported with console.error() (flutter/flutter#178886) 2026-02-19 engine-flutter-autoroll@skia.org Manual roll Skia from dfe78d132e24 to 7bbdc51ab0aa (8 revisions) (flutter/flutter#182612) 2026-02-19 ahabeeblahi1@gmail.com Refactor autofill_group_test.dart to remove Material dependencies (flutter/flutter#181903) 2026-02-19 engine-flutter-autoroll@skia.org Roll Packages from 59f905c to 9da22bf (8 revisions) (flutter/flutter#182611) 2026-02-19 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from Ihau0pUz3u5ajw42u... to KfPgw04T0OEADLJA5... (flutter/flutter#182607) 2026-02-19 magder@google.com Marks Mac_arm64_mokey entrypoint_dart_registrant unflaky (flutter/flutter#181648) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material from Modal barrier tests (flutter/flutter#181708) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material from ticker mode test (flutter/flutter#181696) 2026-02-19 34465683+rkishan516@users.noreply.github.com Remove material imports from Inherited Model, Magnifier, SafeArea, UndoHistory, Navigator and Layers test (flutter/flutter#181709) 2026-02-19 161609011+Akshat-Shuklaaa@users.noreply.github.com docs: fix grammar in animation library documentation (flutter/flutter#182461) 2026-02-19 ahmedsameha1@gmail.com Handle#6537 first grouped tests (flutter/flutter#182077) 2026-02-19 ahabeeblahi1@gmail.com Move SelectionArea web test from widgets to material folder (flutter/flutter#181951) 2026-02-19 engine-flutter-autoroll@skia.org Roll Dart SDK from 44895e617182 to 2642761fca94 (6 revisions) (flutter/flutter#182572) 2026-02-19 okorohelijah@google.com Update create template to always generate both SwiftPM and CocoaPods support for iOS/macOS plugins (flutter/flutter#181251) 2026-02-18 74812392+akhil-ge0rge@users.noreply.github.com Fix(Material): DateRangePicker ignores DatePickerTheme.dayShape (flutter/flutter#181658) 2026-02-18 83986256+devnoaman@users.noreply.github.com Fixing ExpansionTile expandedAlignment not Accepts AlignmentGeometry … (flutter/flutter#180814) 2026-02-18 15619084+vashworth@users.noreply.github.com Give guided error message when CocoaPod and SwiftPM dependency conflicts (flutter/flutter#182392) 2026-02-18 brackenavaron@gmail.com Remove material from interactive_viewer_test.dart (flutter/flutter#181465) 2026-02-18 dkwingsmt@users.noreply.github.com Bring Windows misc coverage out of bringup (flutter/flutter#182332) 2026-02-18 34871572+gmackall@users.noreply.github.com Update android symbolication instructions (flutter/flutter#181267) 2026-02-18 34871572+gmackall@users.noreply.github.com Unmark stable vulkan platform view tests as bringup (flutter/flutter#182554) 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,tarrinneal@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 ticker_mode_test.dart.
part of: #177415
depends on: #181695
Pre-launch Checklist
///).