isLengthBetween method Null safety

bool isLengthBetween(
  1. dynamic value,
  2. int minLength,
  3. int maxLength
)

Checks if length of data is BETWEEN minLength to maxLength.

Implementation

static bool isLengthBetween(dynamic value, int minLength, int maxLength) {
  if (isNull(value)) {
    return false;
  }

  return isLengthGreaterOrEqual(value, minLength) &&
      isLengthLessOrEqual(value, maxLength);
}