Remove Material from Live Text test in editable_text_test#185242
Open
momshaddinury wants to merge 1 commit intoflutter:masterfrom
Open
Remove Material from Live Text test in editable_text_test#185242momshaddinury wants to merge 1 commit intoflutter:masterfrom
momshaddinury wants to merge 1 commit intoflutter:masterfrom
Conversation
Author
|
@justinmc I just realized that after submitting a couple of similar pull requests, I probably shouldn't have since the todo had your name on it. I'm trying to make my first contribution and found this task to be the simplest one to tackle. Please feel free to close this if you prefer. |
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors editable_text_test.dart by replacing MaterialApp with TestWidgetsApp and removing Material-specific dependencies. The review feedback suggests reverting the font size to 16.0 to maintain consistency with the original test configuration and using uppercase hex digits for color literals to comply with style conventions.
64b915c to
1f7e08a
Compare
1f7e08a to
5eaa679
Compare
This was referenced Apr 20, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The test
Tapping the Live Text button calls onLiveTextInputinpackages/flutter/test/widgets/editable_text_test.dartwas flagged with an in-code TODO:This test lives in the Widgets layer but was using
MaterialApp,Typography.material2018(),Colors.blue,Colors.grey, andmaterialTextSelectionHandleControls— none of which are actually required for what it exercises (the Live Text button insideCupertinoAdaptiveTextSelectionToolbar).Changes:
MaterialAppwithTestWidgetsApp(fromwidgets_app_tester.dart, already imported in this file).Typography.material2018().black.titleMedium!withconst TextStyle(fontSize: 14.0).Colors.blue/Colors.greywith rawColorvalues, matching the pattern already used by the adjacent test in the same file.materialTextSelectionHandleControlswithemptyTextSelectionControls.The file-level
package:flutter/material.dartimport remains because many other tests in this 19k-line file still legitimately depend on it. This PR resolves the one flagged test block.Related Issues
Part of #177028
Related: #177412
Tests
No behavior change; the same assertions are preserved. Verified locally with:
Pre-launch Checklist