randInt method

int randInt(
  1. int end, {
  2. int start = 0,
})

Generate a random number between start and end inclusive. 在开始和结束之间生成一个随机数

Implementation

int randInt(int end, {int start = 0}) {
  return _random.nextInt(end) + start;
}