Deprecate `InputDecoration.maintainHintHeight` in favor of `InputDecoration.maintainHintSize`
Summary
#
The InputDecoration.maintainHintHeight
parameter was deprecated
in favor of the InputDecoration.maintainHintSize
parameter.
Context
#
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.
Description of change
#
The InputDecoration.maintainHintHeight
is deprecated in
favor of InputDecoration.maintainHintSize
which makes both the intrinsic
width and height depend on the hint dimensions.
Migration guide
#
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,
),
),
Timeline
#
Landed in version: 3.30.0-0.0.pre
In stable release: 3.32
References
#API documentation:
Relevant issues:
Relevant PRs:
Unless stated otherwise, the documentation on this site reflects Flutter 3.38.1. Page last updated on 2025-10-28. View source or report an issue.