nextString method

String nextString(
  1. int length, {
  2. String charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
})

Implementation

String nextString(int length,
    {String charset =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"}) {
  return String.fromCharCodes(Iterable.generate(
      length, (_) => charset.codeUnitAt(_random.nextInt(charset.length))));
}