nextAsciiCharacter method

String nextAsciiCharacter({
  1. int asciiStart = 65,
  2. int asciiEnd = 90,
})

Generates a String containing a randomly generated ASCII character uniformly distributed in the range from asciiStart to asciiEnd, both inclusive.

By default a character between A and Z will be generated.

Use nextAsciiString if you want to generate multiple characters,

See ASCII Table

Implementation

String nextAsciiCharacter({
  int asciiStart = 65,
  int asciiEnd = 90,
}) {
  _checkAsciiRangeValues(asciiStart, "asciiStart", asciiEnd, "asciiEnd");
  return String.fromCharCode(nextIntBetween(asciiStart, asciiEnd + 1));
}