getSecureRandomString static method
return a secure random string of given length
Implementation
static String getSecureRandomString(int length) {
final random = Random.secure();
final values = List<int>.generate(length, (i) => random.nextInt(256));
return base64UrlEncode(values);
}