StringDotLengthLimiterTextInputFormatter constructor

StringDotLengthLimiterTextInputFormatter(
  1. int? maxLength
)

Creates a formatter that prevents the insertion of more characters than a limit. The maxLength must be null, -1 or greater than zero. If it is null or -1, then no limit is enforced.

Implementation

StringDotLengthLimiterTextInputFormatter(this.maxLength)
  : assert(maxLength == null || maxLength == -1 || maxLength > 0);