between method
Returns true if this is between the given min (inclusive) and max (exclusive).
Implementation
bool between(num min, num max) {
assert(min <= max,
'Invalid bounds: $min and $max, min cannot be greater than max');
return min <= this && this < max;
}