randomSecretCode function
Implementation
String randomSecretCode(int len, {bool isNum = false}) {
final r = Random.secure();
final String chars;
if (isNum) {
chars = '0123456789';
} else {
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
}
return List.generate(len, (index) => chars[r.nextInt(chars.length)]).join();
}