UuidV1Generator constructor

UuidV1Generator({
  1. int? uniqueness,
  2. int? clockSequence,
  3. DateTime now() = DateTime.now,
})

Creates a new instance of a generator with the provided configuration.

If omitted, uniqueness defaults to a random 6-byte (48-bit) ID. If omitted, clockSequence defaults to a random 14-bit value.

Implementation

factory UuidV1Generator({
  int? uniqueness,
  int? clockSequence,
  DateTime Function() now = DateTime.now,
}) {
  return UuidV1Generator._(
    uniqueness ?? _generateUniqueId(),
    clockSequence ?? _generateClockSequence(),
    now,
  );
}