How do you generate unique random numbers in flutter?

var random = Random(); var n1 = random. nextInt(16); var n2 = random. nextInt(15); if (n2 >= n1) n2 += 1; This ensures that the first number can assume all 16 values, and the second number can assume any of the remaining 15 values, and with as even a distribution as the random generator allows.

Sizin İçin Seçtik  TRON yakılıyor mu?

Leave a Reply

Your email address will not be published. Required fields are marked *