galleryRowSpan function

int galleryRowSpan(
  1. double aspect
)

How many coarse ROWS a tile of the given aspect spans in the CSS-grid base. Buckets mirror the previous masonry (square ~2, portrait/wide ~3, tall ~4) against the minColumnWidth/2 row unit.

Implementation

int galleryRowSpan(double aspect) {
  final double a = _clampAspect(aspect);
  if (a <= 0.62) return 4; // tall
  if (a <= 0.84) return 3; // portrait
  if (a >= 1.28) return 3; // wide / panorama (also spans columns)
  return 2; // square
}