randomString method

String randomString(
  1. int length
)

Implementation

String randomString(int length) {
  return List.generate(length, (i) => _randomKeySet[Random.secure().nextInt(_randomKeySet.length)]).join();
}