getUUID method

String getUUID()

Get unique uuid

Implementation

String getUUID() {
  var uuid = const Uuid();
  bool finish = false;

  String toReturn = uuid.v4();
  while (!finish) {
    toReturn = uuid.v4();
    if (!_cache.contains(toReturn)) {
      _cache.add(toReturn);
      finish = true;
    }
  }

  return toReturn;
}