-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix DropdownButtonFormField does not inherit local InputDecorationTheme #176564
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 DropdownButtonFormField does not inherit local InputDecorationTheme #176564
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 addresses an issue where DropdownButtonFormField was not inheriting from a local InputDecorationTheme. The changes replace the global Theme.of(context).inputDecorationTheme with InputDecorationTheme.of(context), which is the correct approach to respect ambient themes. A new test case has been added to specifically verify this fix, ensuring that local theme overrides are applied as expected. The changes are clean, focused, and improve the theming capabilities of the widget.
justinmc
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.
LGTM 👍
56335a6 to
642ec25
Compare
…me (flutter#176564) ## Description This PR replaces global `ThemeData.inputDecorationTheme` usage in `DropdownButtonFormField` with `InputDecorationTheme.of ` which returns the ambient `InputDecorationTheme`. It is a follow up to flutter#168981 which introduces `InputDecorationTheme.of `. ## Related Issue Fixes [DropdownButtonFormField does not inherit local InputDecorationTheme](flutter#176561) ## Tests - Adds 1 test
Description
This PR replaces global
ThemeData.inputDecorationThemeusage inDropdownButtonFormFieldwithInputDecorationTheme.ofwhich returns the ambientInputDecorationTheme.It is a follow up to #168981 which introduces
InputDecorationTheme.of.Related Issue
Fixes DropdownButtonFormField does not inherit local InputDecorationTheme
Tests