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:
除非另有说明,本文档之所提及适用于 Flutter 的最新稳定版本,本页面最后更新时间: 2025-05-20。 查看文档源码 或者 为本页面内容提出建议.