InterceptLengthLimitingTextInputFormatter constructor
InterceptLengthLimitingTextInputFormatter(
- int maxLength, {
- InterceptValue<
TextEditingValue> ? onIntercept, - MaxLengthEnforcement? maxLengthEnforcement,
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
InterceptLengthLimitingTextInputFormatter(
this.maxLength, {
this.onIntercept,
this.maxLengthEnforcement,
}) : assert(maxLength == null || maxLength == -1 || maxLength > 0);