fillRange method
Overwrites a range of elements with fillValue
.
Sets the positions greater than or equal to start
and less than end
,
to fillValue
.
The provided range, given by start
and end
, must be valid.
A range from start
to end
is valid if 0 ≤ start
≤ end
≤ length.
An empty range (with end == start
) is valid.
Implementation
void fillRange(int start, int end, [T? fillValue]) {
var oldLength = _list.length;
_list.fillRange(start, end, fillValue);
if (_list.length != oldLength) _fireWatchers();
}