setConstraint method

T setConstraint({
  1. String? minLength,
  2. String? maxLength,
  3. bool? required,
})

Implementation

T setConstraint({String? minLength, String? maxLength, bool? required}) {
  _minLength = minLength ?? _minLength;
  _maxLength = maxLength ?? _maxLength;
  _required = required ?? _required;

  return this as T;
}