Uuid class abstract
A universally unique identifier, or UUID; a 128-bit label.
UUIds, are, for practical purposes, unique and without a central registration authority. While the probability that a UUID will be duplicated is not zero, it is close enough to zero to be negligible.
See: IETF RFC 4122.
In its canonical textural representation, the 16 octets of a UUID are
represented as a 32 hexadecimel (base-16) digits, displayed in five groups
seperated by hyphens, in the form of 8-4-4-4-12
, for a total of 36
characters (32 hexacdecimel characters and 4 hyphens).
- Annotations
-
- @immutable
- @sealed
Constructors
- Uuid(int l, int m, int h, int s, int n)
-
Creates a UUID from the provided 5 sets of octets.
factory
- Uuid.fromBytes(Uint32List bytes)
-
Creates a UUID from 4 32-bit integers encoded as
bytes
.factory - Uuid.parse(String input)
-
Parses and returns the provided
input
as a UUID.factory - Uuid.v1({DateTime now() = DateTime.now, int? key})
-
Generates and returns a unique timestamp-based UUID.
factory
- Uuid.v4({Random? random})
-
Creates and returns a random UUID.
factory
Properties
- clock → int
-
Returns the clock sequence, which varies based on version.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- node → int
-
Either the MAC address of the node or sometimes a random number.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- time → DateTime?
-
Returns a timestamp if UuidVersion.v1, otherwise returns
null
.no setter - variant → UuidVariant?
-
Known variant of the UUID.
no setter
- version → UuidVersion?
-
Known version of the UUID.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
) → Uint32List - Returns this UUID representation as 4 32-bit integers.
-
toString(
) → String -
Returns this UUIDs representation as a string.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited