slotWidth property

double get slotWidth

The room a row has: a place, or on a linear scale the least stretch between two rows next to one another.

Implementation

double get slotWidth {
  if (!linear) return viewport.barSpacing;
  var least = double.infinity;
  for (var i = 1; i < count; i++) {
    final d = (pos(i) - pos(i - 1)).abs();
    if (d > 0 && d < least) least = d;
  }
  return least.isFinite ? least * _spacing : plotWidth / 4;
}