-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix TextField does not inherit local InputDecorationTheme #176300
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
Fix TextField does not inherit local InputDecorationTheme #176300
Conversation
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.
Code Review
This pull request correctly updates TextField to use the ambient InputDecorationTheme, allowing for local theme overrides. The change is well-tested, with updates to an existing test and the addition of a new one to cover the new behavior. I've suggested a minor improvement to the new test to enhance readability and robustness by making an implicit dependency explicit.
bf90ea0 to
e1c84fb
Compare
e1c84fb to
4eac95c
Compare
4eac95c to
fe7cf56
Compare
QuncCccccc
left a comment
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.
Nice improvement. LGTM! Thank you!
fe7cf56 to
37fa353
Compare
…6300) ## Description This PR replaces global `ThemeData.inputDecorationTheme` usage in `TextField` with `InputDecorationTheme.of ` which returns the ambient `InputDecorationTheme`. It is a follow up to flutter#168981 which introduces `InputDecorationTheme.of `. ## Related Issue Fixes [[SearchBar] Inconsistent inheritance of InputDecorationTheme](flutter#176198) ## Tests - Adds 1 test - Updates 1 test
Description
This PR replaces global
ThemeData.inputDecorationThemeusage inTextFieldwithInputDecorationTheme.ofwhich returns the ambientInputDecorationTheme.It is a follow up to #168981 which introduces
InputDecorationTheme.of.Related Issue
Fixes [SearchBar] Inconsistent inheritance of InputDecorationTheme
Tests