genUuid static method

String genUuid({
  1. bool includeBracket = false,
  2. bool includeDash = true,
})

Implementation

static String genUuid({bool includeBracket = false, bool includeDash = true}) {
  String uuid = (includeBracket) ? '{${const Uuid().v4()}}' : const Uuid().v4();
  if (includeDash) {
    return uuid;
  }
  return uuid.replaceAll(RegExp(r'-'), '');
}