void shuffle ([Random? random]) inherited
void shuffle([Random? random]) { random ??= Random(); if (random == null) throw "!"; // TODO(38493): The `??=` should promote. int length = this.length; while (length > 1) { int pos = random.nextInt(length); length -= 1; var tmp = this[length]; this[length] = this[pos]; this[pos] = tmp; } }