checkValidLength static method

bool checkValidLength(
  1. String text,
  2. int requiredLength
)

Check if string has valid length

text - The text to validate requiredLength - The required minimum length Returns true if text meets length requirement

Implementation

static bool checkValidLength(String text, int requiredLength) {
  return text.length >= requiredLength;
}