Skip to content
pubscout

uuid

4.6.0, released 4 months ago by yuli.dev

Generates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.

WASM-readyRock solid
$ flutter pub add uuid
Source repository

What it does

Provides functions to create version‑1,‑4,‑5,‑6,‑7 and‑8 UUIDs and to validate or parse 128‑bit hexadecimal strings. Works on all Dart platforms with cryptographically strong RNG by default.

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

Use it when

  • You need unique identifiers across devices or services
  • You require support for newer UUID versions (v6‑v8) or strict RFC validation

Skip it when

  • You need a UUID library with built‑in persistence or database integration
  • You prefer a code‑gen based solution for IDs

Strengths

  • Cryptographically strong random generation on all platforms
  • Supports the full range of RFC‑4122 and RFC‑9562 versions
  • Provides explicit format validation and parsing utilities

Weaknesses

  • Only focuses on UUID generation/parsing – no storage or networking features
  • No code‑generation helpers; you must call the API directly

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:uuid/uuid.dart';

var uuid = Uuid();
print(uuid.v4()); // random UUID
print(uuid.v1()); // time‑based UUID

Alternatives

Packages that do the same job and could replace uuid.

  • nanoid2

    A tiny, secure, URL-friendly, unique string ID generator with a pure Dart API.

  • uuid_type

    Provides UUID parsing, generation (v1, v4, v5) and comparison for Dart.

  • ulid

    Lexicographically sortable 128-bit identifier generator.

  • sane_uuid

    A properly designed, efficient UUID library for Dart supporting v1, v4, v5, and v6 generation.

Works with

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