shortuuid 2.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • new56

shortuuid #

Generate short uuid for Dart - shorten the original 32 bit Uuid A port version from short-uuid npm package ( Also thanks to uuid

Getting Started #

$ shortuuid: ^2.0.0
$ pub get

Usage: #

var shortUuid = ShortUuid.shortv4();
// should be something like '2ZvH1zF5heKiXauFhhn9YT'

[2.0.0] - 1 July 2020. #

  • Update to static functions.

[1.0.1] - 22 Jun 2020. #

  • Update CI build.
  • Format codes

[1.0.0] - 22 Jun 2020. #

  • Port short-uuid v3.1.1 from NodeJs.


import 'package:shortuuid/shortuuid.dart';

void main() {

  //create shorter version of uuid:
  var shortUuid = ShortUuid.shortv4();

  //related full uuid v4
  var fullUuid = ShortUuid.toUuidv4(shortUuid);


Use this package as a library

1. Depend on it

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

  shortuuid: ^2.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:shortuuid/shortuuid.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13

Health issues and suggestions

Document public APIs. (-1 points)

20 out of 20 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
uuid ^2.1.0 2.2.0
Transitive dependencies
charcode 1.1.3
collection 1.14.13
convert 2.1.1
crypto 2.1.5
typed_data 1.2.0
Dev dependencies
test any