UuidValue class
- Available extensions
- Annotations
-
- @experimental
Constructors
- UuidValue(String uuid)
-
Takes in a string representation of a
uuid
to wrap.const - UuidValue.fromByteList(Uint8List byteList, {int? offset})
-
fromByteList() creates a UuidValue from a Uint8List of bytes.
factory
-
UuidValue.fromList(List<
int> byteList, {int? offset}) -
fromList() creates a UuidValue from a List<int> of bytes.
factory
- UuidValue.fromNamespace(Namespace ns)
-
fromNamespace() creates a UuidValue from a Namespace enum.
const
- UuidValue.fromString(String uuid)
-
fromString() creates a UuidValue from a String with no validation.
factory
- UuidValue.raw(String uuid)
-
Creates a UuidValue by taking directly the internal string representation of the
uuid
, which is expected to be lowercase.const - UuidValue.withValidation(String uuid, [ValidationMode validationMode = ValidationMode.strictRFC4122, bool noDashes = false])
-
withValidation() creates a UuidValue from a
uuid
string. Optionally, you can provide avalidationMode
to use when validating the uuid string. Throws FormatException if the UUID is invalid.factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isNil → bool
-
no setter
- isV1 → bool
-
no setter
- isV4 → bool
-
no setter
- isV5 → bool
-
no setter
- isV6 → bool
-
no setter
- isV7 → bool
-
no setter
- isV8 → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- time → int
-
no setter
- uuid → String
-
final
- version → int
-
no setter
Methods
-
equals(
UuidValue other) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
{bool validate = false}) → Uint8List -
toFormattedString(
{bool validate = false}) → String -
toString(
) → String -
A string representation of this object.
override
-
validate(
[ValidationMode validationMode = ValidationMode.strictRFC4122, bool noDashes = false]) → void -
validate() validates the internal string representation of the uuid.
Optionally, you can provide a
validationMode
to use when validating the uuid string. Throws FormatException if the UUID is invalid.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override