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:

dart
TextField(
  indicator: InputDecoration(
    maintainHintHeight: false,
  ),
),

Code after migration:

dart
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: