integer static method
Generates a random integer within the specified range.
Parameters:
max: The maximum value (exclusive).min: The minimum value (inclusive). Default is 0.seed: Seed for the random number generator. Default is null.
Example:
int randomInt = RandomProvider.integer(max: 10, min: 5, seed: 42);
// Result: Random integer between 5 (inclusive) and 10 (exclusive).
Implementation
static int integer({int max = 100, int min = 0, int? seed}) {
return Random(seed).nextInt(max - min) + min;
}