element<T> method

T element <T>(
  1. List<T> list
)

Plucks a random element from the given list.

Implementation

T element<T>(List<T> list) {
  return list[_rng.nextInt(list.length)];
}