maxLengthValidator method

int maxLengthValidator(
  1. String value,
  2. int maxValue
)

Implementation

int maxLengthValidator(String value, int maxValue) {
  if (value.isEmpty) {
    return 0;
  } else {
    return value.length;
  }
}