range function
Handy function for grabbing a Range and iterating over it.
for (var i in range(stop: 10)) {
print(i);
}
Implementation
Iterable<num> range({
num start = 0,
required num stop,
num step = 1,
bool stopExclusive = true,
}) {
return Range(
start: start,
stop: stop,
step: step,
stopExclusive: stopExclusive,
).generate();
}