uuid_type 0.6.0-dev

  • README.md
  • Installing
  • Versions
  • 49

UUID type for Dart 2 [WIP]

Build Status

Not yet tested for production use!

This package provides implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs.


  • [x] Creates UUID from string and byte-array representations
  • [x] Provides access to variant, version and byte representation of UUID
  • [ ] Generates RFC4122 version 1 UUIDs
  • [x] Generates RFC4122 version 4 UUIDs
  • [x] Generates RFC4122 version 5 UUIDs (SHA-1 only)
  • [x] Implements Comparable for UUID comparison and lexicographical sorting
  • [x] Overrides hashCode and == operator for usage as Map keys
  • [x] Runs on Dart VM and in browser

UUID Version support:

  • [ ] v1, based on timestamp and MAC address (RFC 4122) [WIP]
  • [ ] v2, based on timestamp, MAC address and POSIX UID/GID (DCE 1.1) Not planned
  • [ ] v3, based on MD5 hashing (RFC 4122) Not planned
  • [x] v4, based on random numbers (RFC 4122)
  • [x] v5, based on SHA-1 hashing (RFC 4122)


  • Dart 2 (tested with >=2.0.0-dev.50.0). Should also work with Dart 1.24, but not tested.
  • crypto package

Getting Started


  1. Add an entry in your pubspec.yaml for uuid_type
  uuid_type: ^0.6.0
  1. Run pub install







  • Refactored toBytes() method into bytes getter


  • More tests
  • Initial package documentation


  • Initial relase, and tests

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  uuid_type: "^0.6.0-dev"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:uuid_type/uuid_type.dart';
Version Uploaded Documentation Archive
0.6.0-dev May 14, 2018 Go to the documentation of uuid_type 0.6.0-dev Download uuid_type 0.6.0-dev archive


We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
99 / 100
Reflects how tidy and up-to-date the package is. [more]
98 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:uuid_type/uuid_type.dart.


  • Package is pre-release.

    Pre-release versions should be used with caution, their API may change in breaking ways.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use uuid_type.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 4 hints.

    Run dartfmt to format lib/src/generators.dart.

    Run dartfmt to format lib/src/hex.dart.

    Similar analysis of the following files failed:

    • lib/src/uuid.dart (hint)
    • lib/uuid_type.dart (hint)


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.50.0 <2.0.0
crypto >=0.9.2 <3.0.0 2.0.5
Transitive dependencies
charcode 1.1.2
collection 1.14.10
convert 2.0.1
typed_data 1.1.5
Dev dependencies
benchmark_harness any
test ^0.12.0