Uuid.v1 constructor
Generates and returns a unique timestamp-based UUID.
For additional customization, create an instance of UuidV1Generator.
Implementation
factory Uuid.v1({
DateTime Function() now = DateTime.now,
int? key,
}) {
final UuidGenerator generator;
if (now == DateTime.now && key == null) {
generator = _uuidV1;
} else {
generator = UuidV1Generator(
uniqueness: key,
now: now,
);
}
return generator.generate();
}