isLess function Null safety

bool isLess(
  1. dynamic value,
  2. dynamic other
)

Checks if value is less than other.

Implementation

bool isLess(dynamic value, dynamic other) {
  if (value is num && other is num) {
    return value < other;
  }
  return value.compareTo(other) < 0;
}