shuffleList method

void shuffleList()

Implementation

void shuffleList() {
  final random = Random();
  for (var i = length - 1; i > 0; i--) {
    final j = random.nextInt(i + 1);
    final temp = this[i];
    this[i] = this[j];
    this[j] = temp;
  }
}