Flake128 constructor
Flake128({
- required int machineId,
- TimestampSource time = _currentMicros,
- bool continuousSequence = false,
Create a Flake128 instance.
Implementation
Flake128({
required this.machineId,
TimestampSource time = _currentMicros,
bool continuousSequence = false,
}) : _tracker = new _Tracker(time, 16, continuousSequence),
_machineIdHex = machineId.toRadixString(16).padLeft(12, '0') {
if (this.machineId < 0 || this.machineId > (1 << 48) - 1)
throw new StateError('Machine ID out of bounds.');
}