getRandom property
int
get
getRandom
Generates a random integer between 0 (inclusive) and this value (exclusive).
Throws RangeError if this value is less than 1.
Implementation
int get getRandom {
if (this < 1) {
throw RangeError('Upper bound must be at least 1.');
}
return math.Random().nextInt(toInt());
}