inRange method Null safety
Is the current number in the range from
to to
, mutually inclusive
Implementation
bool inRange(num from, num to,
{bool startInclusive = true, endInclusive = true}) {
return (from < this || (startInclusive && from == this)) &&
(this < to || (endInclusive && this == to));
}