ulid4d 1.0.0 copy "ulid4d: ^1.0.0" to clipboard
ulid4d: ^1.0.0 copied to clipboard

outdated

Universally Unique Lexicographically Sortable Identifier for Dart

example/example.dart

import 'package:ulid4d/ulid4d.dart';

void main() {
  // generate a ULID String
  final ulidString = ULID.randomULID();

  // generate a ULID instance
  final ulid = ULID.nextULID();

  // generate a byte array (Uint8List) a ULID instance
  final data = ulid.toBytes();

  // generate a ULID from given byte array using 'fromBytes'
  final ulidFromBytes = ULID.fromBytes(data);

  // generate a ULID from given String using 'fromString'
  final ulidFromString = ULID.fromString(ulidString);

  // generate a ULID String from ULID instance
  final ulidStringFromULID = ulid.toString();
}
11
likes
0
pub points
84%
popularity

Publisher

verified publisheraallam.com

Universally Unique Lexicographically Sortable Identifier for Dart

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta

More

Packages that depend on ulid4d