int randomInt(int max, {int min = 0}) { if (min > max) { throw Exception('min cannot be greater than max but $min > $max'); } return min + _random.nextInt(max - min); }