Skip to content

Instantly share code, notes, and snippets.

@developerjamiu
Created May 3, 2022 12:42
Show Gist options
  • Save developerjamiu/1c88201e80353446ccc063a4853bf86f to your computer and use it in GitHub Desktop.
Save developerjamiu/1c88201e80353446ccc063a4853bf86f to your computer and use it in GitHub Desktop.
import 'dart:math';
main() {
var rng = Random();
final list = <int>[];
while (list.length < 10) {
final int randomNumber = rng.nextInt(100);
if (list.contains(randomNumber)) continue;
list.add(randomNumber);
}
print(list);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment