Skip to content
pubscout

ulid4d

2.0.0, released 4 years ago by aallam.com

Universally Unique Lexicographically Sortable Identifier implementation for Dart

WASM-ready
$ flutter pub add ulid4d
Source repository

What it does

Generates and parses ULIDs in Dart with binary compatibility and monotonicity support. Encodes 128 bits of randomness and timestamps into Crockford's base32 strings.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need lexicographically sortable unique identifiers
  • You want a character-efficient alternative to UUIDs
  • You require monotonicity support for identifiers generated in the same millisecond

Skip it when

  • You specifically require standard UUID format for legacy systems

Strengths

  • Lexicographically sortable
  • Monotonicity support
  • Binary implementation support and byte array conversion

Weaknesses

  • Limited to ULID generation and parsing

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
var ulid = ULID.randomULID();
var ulidInstance = ULID.nextULID();
var ulidString = ulidInstance.toString();

Alternatives

Packages that do the same job and could replace ulid4d.

  • uuid

    If you specifically need standard RFC-compliant UUIDs instead of ULIDs.

Works with

Packages commonly used together with ulid4d: ones it builds on, ones built on it, and its own family.