randomAlphaNumeric function
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)),
),
);