randomAlphaNumeric function

String randomAlphaNumeric(
  1. int length
)

Generates a random string of length with alpha-numeric characters.

Implementation

String randomAlphaNumeric(int length) =>
    String.fromCharCodes(Iterable.generate(length, (_) => _chars.codeUnitAt(_random.nextInt(_chars.length))));