[Breaking Change] Use maxLengthEnforcement instead of maxLengthEnforced

545 views
Skip to first unread message

Alex Li

unread,
Jan 13, 2021, 12:43:17 PM1/13/21
to Flutter Public Announcements
Hello everyone,

If you don't use the maxLength or maxLengthEnforced properties in a TextField, TextFormField, or CupertinoTextField, or don't care about the truncation behavior of an editable text field, you can stop reading.

To control the behavior of maxLength in the LengthLimitingTextInputFormatter, use maxLengthEnforcement instead of maxLengthEnforced, which was deprecated.

There are multiple text editing behaviors while the user is entering different types of characters, using different keyboards. To separate behaviors and respect different input traditions for different platforms and users, we recently brought a new tri-stage enum named MaxLengthEnforcement for the LengthLimitingTextInputFormatter, also applied to editable text fields.

For more details about how to migrate or relevant changes to flutter, see links below.


Feel free to comment on the PR if you have any questions.

Thanks,
Alex Li
Reply all
Reply to author
Forward
0 new messages