rangeInclusive method
Get a random integer between 0 (inclusive) and minOrMax
(inclusive), or
between minOrMax
(inclusive) and max
(inclusive) if max
is given.
Implementation
int rangeInclusive(int minOrMax, [int? max]) =>
max == null ? range(minOrMax + 1) : range(minOrMax, max + 1);