Spec-Zone.ru › Dart 2

dart:html

Метод shuffle

void shuffle(
  1. [Random? random]
)
override

Случайным образом перемешивает элементы этого списка.

final numbers = <int>[1, 2, 3, 4, 5];
numbers.shuffle();
print(numbers); // [1, 3, 4, 5, 2] OR some other random result.

Реализация

void shuffle([Random? random]) {
  throw new UnsupportedError("Cannot shuffle immutable List.");
}

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-html/ImmutableListMixin/shuffle.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API