getRandomString static method

String getRandomString(
  1. int length
)

Implementation

static String getRandomString(int length) {
  final random = Random.secure();
  return String.fromCharCodes(Iterable.generate(
      length, (_) => _chars.codeUnitAt(random.nextInt(_chars.length))));
}