customAlphabet function

Future<String> customAlphabet(
  1. String alphabet,
  2. int size
)

Implementation

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