shuffleRange method Null safety

void shuffleRange(
  1. int start,
  2. int end,
  3. [Random? random]
)

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);
}