CyberKeyGeometry.transient constructor
CyberKeyGeometry.transient(})
The geometry of an in-between face of a theme transition (values
already quantised by the caller), from a second LRU so a transition
never evicts the steady-state entries of cached.
Implementation
factory CyberKeyGeometry.transient(
Size size, {
required double chamfer,
required double edgeWidth,
required double plunge,
}) {
final key = (size, chamfer, edgeWidth, plunge);
final hit = _transient.remove(key);
if (hit != null) return _transient[key] = hit;
transientBuilds++;
final g = _transient[key] = CyberKeyGeometry.build(
size,
chamfer: chamfer,
edgeWidth: edgeWidth,
plunge: plunge,
);
while (_transient.length > transientCapacity) {
_transient.remove(_transient.keys.first);
}
return g;
}