uuid_dash 0.1.0 copy "uuid_dash: ^0.1.0" to clipboard
uuid_dash: ^0.1.0 copied to clipboard

A Dart UUID library with Uint8List-based internals, supporting v4, v7, and v8.

example/uuid_dash_example.dart

import 'package:uuid_dash/uuid_dash.dart';

void main() {
  final v4 = Uuid.newV4();
  final v7 = Uuid.nowV7();
  final v8 = Uuid.newV8(Uint8List.fromList(List.generate(16, (i) => i)));

  print('v4 $v4  version=${v4.version.value}');
  print('v7 $v7  version=${v7.version.value}');
  print('v8 $v8  version=${v8.version.value}');

  final parsed = Uuid.parse(v4.hyphenated);
  print('round-trip equal: ${parsed == v4}');
  print('urn:   ${v7.urn}');
  print('brace: ${v7.braced}');
  print('simple: ${v7.simple}');
}
1
likes
160
points
23
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart UUID library with Uint8List-based internals, supporting v4, v7, and v8.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on uuid_dash