fillRange method
void fillRange(Sets the objects in the range start inclusive to end exclusive to the given fillValue.
The provide range, given by start and end, must be valid. A range from start to end is valid if 0 <= start <= end <= len, where len is this list's length. The range starts at start and has length end - start. An empty range (with end == start) is valid.
Source
void fillRange(int start, int end, [E fill]) {
RangeError.checkValidRange(start, end, this.length);
for (int i = start; i < end; i++) {
this[i] = fill;
}
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-collection/ListMixin/fillRange.html