random method Null safety

T random()

Implementation

T random() {
  final randomIdx = _random.nextInt(this.length);
  return this.toList()[randomIdx];
}