withMaxLength method

  1. @useResult
WidgetSelector<TextField> withMaxLength(
  1. int? value
)

Creates a WidgetSelector that finds all TextField where maxLength equals (==) value.

Example usage:

spot<TextField>().withMaxLength(10).existsOnce();

Implementation

@useResult
WidgetSelector<TextField> withMaxLength(int? value) {
  return withDiagnosticProp<int>(
      'maxLength', (it) => value == null ? it.isNull() : it.equals(value));
}