isTextLengthInRange static method

bool isTextLengthInRange(
  1. String? value, {
  2. int min = 1,
  3. int max = 255,
})

Returns true if the string length is within min and max bounds.

Implementation

static bool isTextLengthInRange(String? value, {int min = 1, int max = 255}) {
  final length = value?.length ?? 0;
  return length >= min && length <= max;
}