Guid class final
Represents a globally unique identifier (GUID), a 128-bit value used to uniquely identify entities such as COM interfaces, class objects, and entry-point vectors (EPVs).
A GUID is typically represented as a 36-character string in the format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where each x is a hexadecimal
digit.
Structure:
- 8 hex digits (32 bits)
- 4 hex digits (16 bits)
- 4 hex digits (16 bits)
- 4 hex digits (16 bits)
- 12 hex digits (48 bits)
Example: 6b29fc40-ca47-1067-b31d-00dd010662da
- Available extensions
Constructors
- Guid(int data1, int data2, int data3, Uint8List data4)
-
Creates a Guid from its raw binary components.
const
- Guid.fromBytes(Uint8List bytes)
-
Creates a Guid instance from a 16-byte little-endian binary encoding.
factory
- Guid.fromString(String guid)
-
Parses a Guid from a string in the canonical format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.factory - Guid.generate()
-
Generates a new GUID using a cryptographically secure random number
generator.
factory
- Guid.zero()
-
Creates a zero-initialized GUID (
00000000-0000-0000-0000-000000000000).
Properties
- data1 → int
-
The first 8 hexadecimal digits of the GUID.
final
- data2 → int
-
The first group of 4 hexadecimal digits.
final
- data3 → int
-
The second group of 4 hexadecimal digits.
final
- data4 → Uint8List
-
The last 8 bytes of the GUID.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isZero → bool
-
Whether the GUID is a zero-initialized GUID.
no setter
- 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
-
toBytes(
) → Uint8List -
Available on Guid, provided by the GuidExtension extension
Converts the Guid into its standard 16-byte little-endian binary representation. -
toString(
) → String -
Converts the GUID into its canonical string representation:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override