MaxLengthEnforcement

enforced

To not enforce the limitation

To show a max length error in TextField,
but not truncate when the limit is exceeded,
use MaxLengthEnforcement.none instead of
maxLengthEnforced: false.

Code before migration:

TextField

maxLength:

maxLengthEnforced:

false

Code after migration:

TextField

maxLength:

maxLengthEnforcement:

MaxLengthEnforcement

none

For CupertinoTextField, which isn’t able to show an error message,
just don’t set the maxLength value.

Code before migration:

CupertinoTextField

maxLength:

maxLengthEnforced:

false

Code after migration: