uuid_type 0.7.0-dev

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 63

UUID type for Dart 2

Build Status

Not yet tested for production use!

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

Features:

  • [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
  • [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

RFC4122 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)

Requirements

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

Getting Started

Installation

  1. Add an entry in your pubspec.yaml for uuid_type
dependencies:
  uuid_type: ^0.6.0
  1. Run pub get (flutter packages get for Flutter)
  2. Import
import 'package:uuid_type/uuid_type.dart';

Usage

API

[TBD]

Examples

[TBD]

0.7.0-dev

  • Dart 2 is a minimum required pub publishversion

0.6.0-dev

  • Refactored toBytes() method into bytes getter

0.5.2-dev

  • More tests
  • Initial package documentation

0.5.1-dev

  • Initial relase, and tests

Use this package as a library

1. Depend on it

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


dependencies:
  uuid_type: ^0.7.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.7.0-dev Aug 6, 2018 Go to the documentation of uuid_type 0.7.0-dev Download uuid_type 0.7.0-dev 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
Popularity:
Describes how popular the package is relative to other packages. [more]
32
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
85
Overall:
Weighted score of the above. [more]
63
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.6

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Format lib/src/hex.dart.

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

Format lib/src/tool.dart.

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

Format lib/src/uuid.dart.

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

Format lib/uuid_type.dart.

Run dartfmt to format lib/uuid_type.dart.

Maintenance suggestions

Maintain an example. (-10 points)

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.

Package is pre-release. (-5 points)

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.61.0 <3.0.0
crypto >=2.0.0 <3.0.0 2.0.6
Transitive dependencies
charcode 1.1.2
collection 1.14.11
convert 2.0.2
typed_data 1.1.6
Dev dependencies
benchmark_harness ^1.0.0
test ^1.3.0