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.