neouuid

Fast and idiomatic UUIDs (Universally Unique Identifiers) in Dart.

Binary on pub.dev Code coverage Github action status Dartdocs Style guide

This library decodes and generates UUIDs, 128-bits represented as 32 hexadecimal digits:

ba6eb330-4f7f-11eb-a2fb-67c34e9ac07c

Usage

The generator supports three different UUID modes:

  • v1: Guaranteed unique, unless generated from the same computer at the same time.
  • v4: Completely random, 2^128 possible combinations make it almost impossible to repeat.
  • v5: Non-random, generateed by providing an input and namespace string.

Performance & Compatibility

This package is intended to work identically and well in both the standalone Dart VM, Flutter, and web builds of Dart and Flutter (both in DDC and Dart2JS). Contributions are welcome to add special-cased that improves performacne for a specific platform (as long as there is a fallback for other platforms).

Contributing

Some inspiration:

GitHub

View Github