base62ToUuid method

String base62ToUuid()

Decodes this base62-encoded String to a UUID.

Implementation

String base62ToUuid() {
  final BaseXCodec codec = BaseXCodec(
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
  );

  final Uint8List bytes = codec.decode(this);
  return UuidValue.fromByteList(bytes).toString();
}