Deprecate `InputDecoration.maintainHintHeight` in favor of `InputDecoration.maintainHintSize`
Summary
#The InputDecoration.maintainHintHeight
parameter was deprecated
in favor of the InputDecoration.maintainHintSize
parameter.
Context
#The defaults intrincic size of an input decorator depends on the hint size.
The InputDecoration.maintainHintSize
parameter can be set to false to
make the intrincic size ignores the hint size when the hint is not 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 intrisic 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: Not yet
References
#API documentation:
Relevant issues:
Relevant PRs:
除非另有说明,本文档之所提及适用于 Flutter 的最新稳定版本,本页面最后更新时间: 2025-02-28。 查看文档源码 或者 为本页面内容提出建议。