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:
Unless stated otherwise, the documentation on this site reflects the latest stable version of Flutter. Page last updated on 2025-02-28. View source or report an issue.