createRandomString function

String createRandomString(
  1. int length
)

Implementation

String createRandomString(int length) {
  const letters =
      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~";
  Random _rnd = Random();
  return String.fromCharCodes(Iterable.generate(
      length, (_) => letters.codeUnitAt(_rnd.nextInt(letters.length))));
}