lundi 26 août 2019

Generate two different random numbers in dart

How can i generate two different random numbers in dart?

I have generated two random numbers using code below.

int rand1 = Random().nextInt(16); int rand2 = Random().nextInt(16);

If rand1==rand2, how do i generate new random numbers until rand1!=rand2?




Aucun commentaire:

Enregistrer un commentaire