ulid 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 85

Ulid implementation in Dart #

Lexicographically sortable, 128-bit identifier (UUID) with 48-bit timestamp and 80 random bits. Canonically encoded as a 26 character string, as opposed to the 36 character UUID.

Original implementation: https://github.com/alizain/ulid/

Usage #

A simple usage example:

import 'package:ulid/ulid.dart';

main() {
  print(new Ulid());
  print(new Ulid().toUuid());

Changelog #

1.0.2 #

  • Using package:pedantic.
  • Removed leftover main method.

1.0.1 #

  • Declared support for Dart 2.
  • Upgraded dependencies.

1.0.0 #

  • First public version.


// Copyright (c) 2017, Agilord. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:ulid/ulid.dart';

void main() {
  print(new Ulid());
  print(new Ulid().toUuid());

Use this package as a library

1. Depend on it

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

  ulid: ^1.0.2

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:ulid/ulid.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 Oct 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21


Detected platforms: Flutter, web, other

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

Health suggestions

Fix lib/ulid.dart. (-0.50 points)

Analysis of lib/ulid.dart reported 1 hint:

line 49 col 9: DO use curly braces for all flow control structures.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0
Dev dependencies
pedantic ^1.0.0
test ^1.0.0