randomInt static method
Generate random number within range
min - Minimum value
max - Maximum value
Returns random number within range
Implementation
static int randomInt(int min, int max) {
if (min > max) throw ArgumentError('Min value cannot be greater than max value');
return min + (DateTime.now().millisecondsSinceEpoch % (max - min + 1));
}