lte function

bool lte(
  1. dynamic a,
  2. dynamic b
)

Implementation

bool lte(a, b) {
  if (a is String && b is String) return a.compareTo(b) <= 0;
  if (a is num && b is num) return a <= b;
  if ((a is List && b is List) || a is Map && b is Map) {
    return a.length <= b.length;
  }
  return false;
}