upTo method Null safety
Factory method to create a progression in which the maximum value is to,
with an optional minimum value from which defaults to 0,
and a common difference of step which defaults to 1.
Example:
Range.upTo(2) // => 0, 1, 2
Range.upTo(5, from: 1, step: 2) // => 1, 3, 5
Implementation
static IntRange upTo(int to, {int from = 0, int step = 1}) =>
IntRange(from, to, step: step);