getRandString function

String getRandString(
  1. int len
)

Returns a random string of size len.

Implementation

String getRandString(int len) {
  var random = Random.secure();
  var values = List<int>.generate(len, (i) => random.nextInt(255));
  return base64UrlEncode(values);
}