generateNewUniqueId method

String generateNewUniqueId({
  1. required Map<String, EventEmitterListener> event_datas,
})

Implementation

String generateNewUniqueId({
  required Map<String, EventEmitterListener> event_datas,
}) {
  while (true) {
    final String new_unique_id = generateUuid(Random().nextInt(10) + 10,
        text: "0123456789abcdefghijklmnopqrstuvwxyz-_");
    if (event_datas.containsKey(new_unique_id) == false) {
      return new_unique_id;
    }
  }
}