isLength static method

bool isLength(
  1. String value,
  2. int min, [
  3. int? max
])

check if the length of the string value falls in a range

Implementation

static bool isLength(String value, int min, [int? max]) {
  return value.length >= min && (max == null || value.length <= max);
}