randomString function

String randomString(
  1. int length, {
  2. int from = 33,
  3. int to = 126,
})

Implementation

String randomString(int length, {int from = 33, int to = 126}) {
  return String.fromCharCodes(
      List.generate(length, (index) => randomBetween(from, to)));
}