random method

T random({
  1. int? seed,
})

Return a random element of the list.

Implementation

T random({int? seed}) {
  return this[math.Random(seed).nextInt(length)];
}