Skip to content

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Sep 30, 2025

Description

This PR replaces global ThemeData.inputDecorationTheme usage in TextField with InputDecorationTheme.of which returns the ambient InputDecorationTheme.
It is a follow up to #168981 which introduces InputDecorationTheme.of .

Related Issue

Fixes [SearchBar] Inconsistent inheritance of InputDecorationTheme

Tests

  • Adds 1 test
  • Updates 1 test

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Sep 30, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@bleroux bleroux force-pushed the fix_TextField_does_not_inherit_local_InputDecorationTheme branch from bf90ea0 to e1c84fb Compare September 30, 2025 19:34
@bleroux bleroux requested a review from QuncCccccc September 30, 2025 19:36
@bleroux bleroux force-pushed the fix_TextField_does_not_inherit_local_InputDecorationTheme branch from e1c84fb to 4eac95c Compare October 1, 2025 06:20
@dkwingsmt dkwingsmt self-requested a review October 1, 2025 18:09
@QuncCccccc QuncCccccc force-pushed the fix_TextField_does_not_inherit_local_InputDecorationTheme branch from 4eac95c to fe7cf56 Compare October 7, 2025 15:31
Copy link
Contributor

@QuncCccccc QuncCccccc left a 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!

@bleroux bleroux force-pushed the fix_TextField_does_not_inherit_local_InputDecorationTheme branch from fe7cf56 to 37fa353 Compare October 8, 2025 06:01
@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 9, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Oct 9, 2025
Merged via the queue into flutter:master with commit 1275194 Oct 9, 2025
79 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 9, 2025
@bleroux bleroux deleted the fix_TextField_does_not_inherit_local_InputDecorationTheme branch October 9, 2025 08:35
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SearchBar] Inconsistent inheritance of InputDecorationTheme

2 participants