randomString function

String randomString(
  1. int length
)

Implementation

String randomString(int length) {
  var r = Random();
  const _chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz';
  var stringWithoutNumber =
  List.generate(length, (index) => _chars[r.nextInt(_chars.length)]).join();
  return stringWithoutNumber;
}