ULID class abstract interface

Universally Unique Lexicographically Sortable Identifier.

ULID Specification

Implemented types

Constructors

ULID.fromBytes(Uint8List data)
Generate a ULID from given bytes. data must be 16 bytes in length.
factory
ULID.fromString(String string)
Create ULID object from given (valid) ULID string.
factory
ULID.nextMonotonicULID(ULID previous, [int? timestamp])
Generate the next monotonic ULID. If an overflow happened while incrementing the random part of the given previous ULID value then the returned value will have a zero random part.
factory
ULID.nextULID([int? timestamp])
Generate a ULID.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
leastSignificantBits → Int64
The least significant 64 bits of this ULID.
no setter
mostSignificantBits → Int64
The most significant 64 bits of this ULID.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp → Int64
Get timestamp.
no setter

Methods

compareTo(ULID other) int
Compares this object to another object.
inherited
increment() ULID
Get next valid ULID value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBytes() Uint8List
Generate byte array Uint8List for this ULID.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

nextMonotonicULIDStrict(ULID previous, [int? timestamp]) ULID?
Generate the next monotonic ULID, or returns null if an overflow happened while incrementing the random part of the given previous ULID.
randomULID([int? timestamp]) String
Generate a ULID String.