quantizeWidth static method
Buckets width into steps (default 24px) to limit cache key cardinality without losing meaningful layout precision.
Implementation
static int quantizeWidth(double width, {int step = 24}) {
if (step <= 0) return width.round();
return (width / step).floor();
}