doubleInRange static method
Generates a random double in the given range min, [max).
Implementation
static double doubleInRange(double min, double max) {
if (min >= max) throw ArgumentError('min must be less than max');
final rand = math.Random();
return min + rand.nextDouble() * (max - min);
}