# Deprecate `InputDecoration.maintainHintHeight` in favor of `InputDecoration.maintainHintSize`

> The `InputDecoration.maintainHintHeight` parameter has been replaced by `InputDecoration.maintainHintSize`.




:::important
These breaking change docs are accurate, as of the release
under which they are published. Over time, the
workarounds described here might become inaccurate.
We don't, in general, keep these breaking change docs up
to date as of each release.

The [breaking change index file](/release/breaking-changes)
lists the docs created for each release.
:::


## 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 highlightLines=3
TextField(
  indicator: InputDecoration(
    maintainHintHeight: false,
  ),
),
```

Code after migration:

```dart highlightLines=3
TextField(
  indicator: InputDecoration(
    maintainHintSize: false,
  ),
),
```

## Timeline

Landed in version: 3.30.0-0.0.pre<br>
In stable release: 3.32

## References

API documentation:

- [`InputDecoration.maintainHintHeight`][]
- [`InputDecoration.maintainHintSize`][]

Relevant issues:

- [Issue #93337][]

Relevant PRs:

- [Fix TextField intrinsic width when hint is not visible][]

[`InputDecoration.maintainHintHeight`]: https://api.flutter.dev/flutter/material/InputDecoration/maintainHintHeight.html
[`InputDecoration.maintainHintSize`]: https://main-api.flutter.dev/flutter/material/InputDecoration/maintainHintSize.html
[Issue #93337]: https://github.com/flutter/flutter/issues/93337
[Fix TextField intrinsic width when hint is not visible]: https://github.com/flutter/flutter/pull/161235

