randomIn method

int randomIn(
  1. int max
)

Returns random integer seeded with hashCode and less than max

Implementation

int randomIn(int max) => Random(hashCode).nextInt(max);