isLengthLessOrEqual static method

bool isLengthLessOrEqual(
  1. dynamic value,
  2. int maxLength
)

Checks if length of data is LESS OR EQUAL to maxLength.

Implementation

static bool isLengthLessOrEqual(dynamic value, int maxLength) {
  final length = _obtainDynamicLength(value);

  if (length == null) {
    return false;
  }

  return length <= maxLength;
}