- Notifications
You must be signed in to change notification settings - Fork29.3k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
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 whereDropdownButtonFormField
was not inheriting from a localInputDecorationTheme
. The changes replace the globalTheme.of(context).inputDecorationTheme
withInputDecorationTheme.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.
Description
This PR replaces global
ThemeData.inputDecorationTheme
usage inDropdownButtonFormField
withInputDecorationTheme.of
which returns the ambientInputDecorationTheme
.It is a follow up to#168981 which introduces
InputDecorationTheme.of
.Related Issue
FixesDropdownButtonFormField does not inherit local InputDecorationTheme
Tests