fillRange method
Fills the range [start, end) with fill and notifies when any slot changes.
Implementation
@override
void fillRange(int start, int end, [E? fill]) {
bool needNotify = false;
E value = fill as E;
RangeError.checkValidRange(start, end, peek.length);
for (int i = start; i < end; i++) {
if (!needNotify && peek[i] != value) {
needNotify = true;
}
peek[i] = value;
}
if (needNotify) {
notify();
}
}