shuffleRange method Null safety
Shuffles a range of elements.
If random
is omitted, a new instance of Random is used.
Implementation
void shuffleRange(int start, int end, [Random? random]) {
if (source.length != _initialSize) {
throw ConcurrentModificationError(source);
}
RangeError.checkValidRange(start, end, length);
algorithms.shuffle(source, this.start + start, this.start + end, random);
}