tape static method
Generates a tape-style CarpetStyle for granular, horizontal scrolling layouts.
Configures narrow, high-granularity tiles for tape-like feeds, scaling with device width and adjustable multipliers. Integrates with Carpet for dynamic content placement, allowing holes for irregular spacing. Ideal for timeline or news ticker views within MagicCarpet or Refresher components.
Implementation
static CarpetStyle tape(BuildContext context,
{double scale = 1, int quiltHeightMultiplier = 1}) {
double width = MediaQuery.of(context).size.width;
double wSize = width / 2000;
scale *= 1.2;
return CarpetStyle().tapeView(
granularity:
min((50 * scale).round(), max((50 * scale * wSize).round(), 1)),
height: min((8 / scale).round(),
max(((8 / scale) * pow(wSize, 0.4)).round(), 1)),
quiltMultiplier: quiltHeightMultiplier);
}