randomList<E> static method
Returns a pseudo-random element <E>
from the parameter list
.
Using the Random()
class to compute the List index.
Implementation
@pragma("vm:prefer-inline")
static E randomList<E>(List<E> list) {
return list[randomRangeInt(0, list.length)];
}