random method
Returns a random element from this collection.
@throws NoSuchElementException if this collection is empty.
Implementation
T random([math.Random? random]) {
final r = random ?? math.Random();
return elementAt(r.nextInt(size));
}
Returns a random element from this collection.
@throws NoSuchElementException if this collection is empty.
T random([math.Random? random]) {
final r = random ?? math.Random();
return elementAt(r.nextInt(size));
}