uuid_v4 0.0.1 copy "uuid_v4: ^0.0.1" to clipboard
uuid_v4: ^0.0.1 copied to clipboard

RFC4122 (v4 only) UUID Generator and Parser for Dart

uuid_v4 #

RFC4122 (v4 only) UUID Generator and Parser for Dart.

Getting started #

Import the package:

import 'package:uuid_v4/uuid_v4.dart';

// To interface your entityId instead of importing this package everywhere.
typedef EntityId = UUIDv4;

// Generate a new UUID v4 variable.
final entityId = UUIDv4();

// Parse an UUID v4 from string.
final String uuidString = "Some invalid UUID";
final UUIDv4 uuid = UUIDv4.parse(uuidString); // Will fail
final UUIDv4? tryUuid = UUIDv4.tryParse(uuidString); // Will return null

Usage #

See example/main.dart for an illustration of the feature set.

0
likes
150
points
169
downloads

Publisher

verified publisherwattshout.com

Weekly Downloads

RFC4122 (v4 only) UUID Generator and Parser for Dart

Homepage
Repository (GitHub)
View/report issues

Topics

#uuid #identifier #id

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on uuid_v4