randomRangeInt static method

int randomRangeInt(
  1. num min,
  2. num max
)

Returns a pseudo-random int number between parameters min and max. Doesn't check for errors: Parameters can not be null; And min > max.

Implementation

@pragma("vm:prefer-inline")
static int randomRangeInt(num min, num max) {
  return min.toInt() + _rnd.nextInt(max.toInt() - min.toInt());
}