randomChars function

String randomChars(
  1. int length
)

Implementation

String randomChars(int length) {
  var result = '';
  var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
  var charactersLength = characters.length;
  for (var i = 0; i < length; i++) {
    result += characters[0 + _random.nextInt(charactersLength - 0)];
  }
  return result;
}