random method

T random([
  1. int? seed
])

Returns a random value from the iterable.

Implementation

T random([int? seed]) {
  assert(isNotEmpty, 'The iterable must not be empty.');
  return elementAt(_getRandomIndex(seed));
}