random property

T? get random

随机获取元素

Implementation

T? get random {
  if (isNullOrEmpty) return null;
  return this![Random().nextInt(this!.length)];
}