The `InputDecoration.maintainHintHeight` parameter was deprecated in favor of the `InputDecoration.maintainHintSize` parameter.
Original behavior
The default intrinsic size of an input decorator depends on the hint size. The `InputDecoration.maintainHintSize` parameter can be set to `false` to make the intrinsic size ignores the hint size when the hint isn't visible. Previously, the `InputDecoration.maintainHintHeight` parameter was used to override the default intrinsic height and had no impact on the intrinsic width.
New behavior
The `InputDecoration.maintainHintHeight` is deprecated in favor of `InputDecoration.maintainHintSize` which makes both the intrinsic width and height depend on the hint dimensions.
- Who is affected
- Code that still calls the deprecated API; it keeps working until removal but produces analyzer warnings. Code that uses InputDecoration.maintainHintHeight, InputDecoration.maintainHintSize.
- Practical impact
- Warnings now; removal in a future release. Plan the migration but no immediate break.
- What action should I take?
- Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.
Before and after (from the official guide)
| 1 | TextField( | |
| 2 | indicator: InputDecoration( | |
| 3 | − | maintainHintHeight: false, |
| 4 | ), | |
| 5 | ), |
| 1 | TextField( | |
| 2 | indicator: InputDecoration( | |
| 3 | + | maintainHintSize: false, |
| 4 | ), | |
| 5 | ), |
Raw before / after
TextField(
indicator: InputDecoration(
maintainHintHeight: false,
),
),TextField(
indicator: InputDecoration(
maintainHintSize: false,
),
),Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)
Replace [InputDecoration.maintainHintHeight][] with
[InputDecoration.maintainHintSize][] to override the default intrinsic size
computation.
Code before migration:
TextField(
indicator: InputDecoration(
maintainHintHeight: false,
),
),Code after migration:
TextField(
indicator: InputDecoration(
maintainHintSize: false,
),
),AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.Listed in the official breaking-changes index; title states deprecation.
An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.
- Source commit
- b3045439b7c0
- Source last updated
- Oct 21, 2026
- Last synchronized
- Oct 21, 2026
- Publication status
- published
Publication history
- Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.