getRandomCharacters static method

String getRandomCharacters(
  1. int length
)

Outputs random characters.

Implementation

static String getRandomCharacters(int length) {
  final random = Random.secure();
  final values = List<int>.generate(length, (i) => random.nextInt(33) + 89);
  return String.fromCharCodes(values);
}