-
Notifications
You must be signed in to change notification settings - Fork 30.5k
Move CheckedModeBanner tests to material and remove Material import from widgets banner_test #181261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
auto-submit
merged 10 commits into
flutter:master
from
kazbeksultanov:fix-remove-material-import-banner-test
Feb 4, 2026
Merged
Move CheckedModeBanner tests to material and remove Material import from widgets banner_test #181261
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5ef2485
test: move CheckedModeBanner tests to material and remove Material im…
kazbeksultanov ced9c6e
Merge branch 'master' into fix-remove-material-import-banner-test
kazbeksultanov c5ddadb
Returned the tests and changed Material with WidgetApp with default p…
kazbeksultanov ae50f81
rename test name
kazbeksultanov 7ea3247
removed material import
kazbeksultanov 80c2de9
Update packages/flutter/test/widgets/banner_test.dart
kazbeksultanov c44f47a
Merge branch 'master' into fix-remove-material-import-banner-test
kazbeksultanov 95beaa4
refactored using TestWidgetsApp
kazbeksultanov 606fa0d
Merge branch 'master' into fix-remove-material-import-banner-test
kazbeksultanov 745ed30
remove the Color
kazbeksultanov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merely "moving" the file does not address this issue.
The checked mode banner widget is also used for CupertinoApp, so the proper fix is to replace MaterialApp and friends in this file with their flutter/widgets counterpart. This is blocked on #180456
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did manage to fix this without moving the file in #181274
Maybe we should prefer that PR?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was my bad; it seems like I misunderstood this task.
I agree that
TestWidgetsAppis really needed. But I don't see it yet on the master.I expected that TestWidgetsApp is required because, there will be a lot of defaults values to be passed.
But for this exact case I was able to use
WidgetsAppwith default parameters to simulateMaterial.Now, I think we can create private _TestWidgetApp in each file where it's required by tests, and adjust it for that use case only without generating one universal
TestWidgetsAppfor all cases.What do you think? Is it ok?
@justinmc @navaronbracke
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a TestWidgetsApp that will be introduced soon, but that PR is not yet merged. If it works for banner_test.dart by providing WidgetsApp with some defaults, then LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this case seems like it's working fine.
@navaronbracke @justinmc can you take a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops I should have left comment https://github.com/flutter/flutter/pull/181261/files#r2733374357 here. I think we should wait for TestWidgetsApp.