Uuid class

uuid for Dart Author: Yulian Kuncheff Released under MIT License.

Constructors

Uuid({Map<String, dynamic>? options})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
options Map<String, dynamic>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
v1({Map<String, dynamic>? options}) String
v1() Generates a time-based version 1 UUID
v1buffer(List<int> buffer, {Map<String, dynamic>? options, int offset = 0}) List<int>
v1buffer() Generates a time-based version 1 UUID
v1obj({Map<String, dynamic>? options}) UuidValue
v1obj() Generates a time-based version 1 UUID
v4({Map<String, dynamic>? options}) String
v4() Generates a RNG version 4 UUID
v4buffer(List<int> buffer, {Map<String, dynamic>? options, int offset = 0}) List<int>
v4buffer() Generates a RNG version 4 UUID
v4obj({Map<String, dynamic>? options}) UuidValue
v4obj() Generates a RNG version 4 UUID
v5(String? namespace, String? name, {Map<String, dynamic>? options}) String
v5() Generates a namespace & name-based version 5 UUID
v5buffer(String? namespace, String? name, List<int>? buffer, {Map<String, dynamic>? options, int offset = 0}) List<int>
v5buffer() Generates a RNG version 4 UUID
v5obj(String? namespace, String? name, {Map<String, dynamic>? options}) UuidValue
v5obj() Generates a namspace & name-based version 5 UUID

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isValidOrThrow({String fromString = '', Uint8List? fromByteList, ValidationMode validationMode = ValidationMode.strictRFC4122}) → void
isValidUUID({String fromString = '', Uint8List? fromByteList, ValidationMode validationMode = ValidationMode.strictRFC4122}) bool
Validates the provided uuid to make sure it has all the necessary components and formatting and returns a bool You can choose to validate from a string or from a byte list based on which parameter is passed.
parse(String uuid, {List<int>? buffer, int offset = 0, bool validate = true, ValidationMode validationMode = ValidationMode.strictRFC4122}) List<int>
Parses the provided uuid into a list of byte values as a List
parseAsByteList(String uuid, {List<int>? buffer, int offset = 0, bool validate = true, ValidationMode validationMode = ValidationMode.strictRFC4122}) Uint8List
Parses the provided uuid into a list of byte values as a Uint8List. Can optionally be provided a buffer to write into and a positional offset for where to start inputting into the buffer. Throws FormatException if the UUID is invalid. Optionally you can set validate to false to disable validation of the UUID before parsing.
unparse(List<int> buffer, {int offset = 0}) String
Unparses a buffer of bytes and outputs a proper UUID string. An optional offset is allowed if you want to start at a different point in the buffer.

Constants

NAMESPACE_DNS → const String
NAMESPACE_NIL → const String
NAMESPACE_OID → const String
NAMESPACE_URL → const String
NAMESPACE_X500 → const String