customAlphabet function

String customAlphabet(
  1. String alphabet,
  2. int size
)

Implementation

String customAlphabet(String alphabet, int size) {
  final len = alphabet.length;
  String id = '';
  while (0 < size--) {
    id += alphabet[_random.nextInt(len)];
  }
  return id;
}