generateRandomID function

String generateRandomID([
  1. int length = 20
])

Implementation

String generateRandomID([
  int length = 20,
]) {
  return String.fromCharCodes(
    Iterable.generate(
      length,
      (_) => _chars.codeUnitAt(
        _randomGenerator.nextInt(_chars.length),
      ),
    ),
  );
}