shuffledRange method

Bloom<List<E>> shuffledRange(
  1. int start,
  2. int end, [
  3. Random? random
])

Returns a new unmodifiable list with a range of elements shuffled reactively.

  • start: Inclusive start index of the range to shuffle.
  • end: Exclusive end index of the range to shuffle.
  • random: Optional random number generator.

Implementation

Bloom<List<E>> shuffledRange(int start, int end, [Random? random]) =>
    computed((via) {
      final copy = via(_listBloom).toList();
      col.ListExtensions(copy).shuffleRange(start, end, random);
      return List<E>.unmodifiable(copy);
    });