IdAllocator constructor
Creates an allocator. Pass an explicit session to resume a known
session, or excludedSessions (the salts already used in a loaded
document) to draw a fresh salt that avoids them. random is seedable
for deterministic tests.
Implementation
IdAllocator({int? session, Set<int>? excludedSessions, Random? random})
: session =
session ?? _drawSession(random ?? Random.secure(), excludedSessions);