parseHex128 static method
Parses the provided uuid into a list of byte values as a List<int>.
Can optionally be provided a buffer to write into and
a positional offset for where to start inputting into the buffer.
Returns the buffer containing the bytes. If no buffer was provided,
a new buffer is created and returned. If a buffer was provided, it
is returned (even if the uuid bytes are not placed at the beginning of
that buffer).
Throws FormatException if the hexadecimal format is invalid.
UUID version and variant bits are not validated.
Optionally you can set validate to false to disable
validation of the UUID before parsing.
Set noDashes to true when parsing 32 hexadecimal characters without
dashes.
Throws RangeError if a buffer is provided and it is too small.
It is also thrown if a non-zero offset is provided without providing
a buffer.
Implementation
static List<int> parseHex128(
String uuid, {
List<int>? buffer,
int offset = 0,
bool validate = true,
bool noDashes = false,
}) {
if (validate) {
UuidValidation.isValidFormatOrThrow(fromString: uuid, noDashes: noDashes);
}
return _parse(uuid, buffer, offset);
}