randomItem method
dynamic
randomItem()
Find a random item in a list.
Implementation
dynamic randomItem() {
if (this == null) return null;
return this![Random().nextInt(this!.length)];
}
Find a random item in a list.
dynamic randomItem() {
if (this == null) return null;
return this![Random().nextInt(this!.length)];
}