downTo method Null safety
Returns a progression from this value down to the specified toInclusive
value with the step -step
.
Example:
3.downTo(1) // => 3, 2, 1
5.downTo(1, step: 2) // => 5, 3, 1
Implementation
IntRange downTo(int toInclusive, {int step = 1}) =>
IntRange(this, toInclusive, step: -step);