CarpetStyle constructor

const CarpetStyle({
  1. int maxSizeOptions = 10,
  2. int maxQuiltHeight = 6,
  3. int maxTileHeight = 3,
  4. int maxTileWidth = 3,
  5. double spacing = 8,
  6. int carpetWidth = 5,
  7. CarpetWidthCalculator carpetWidthCalc = _defaultCarpetWidthCalc,
  8. bool allowFutureFeeding = true,
  9. bool allowPastFeeding = true,
  10. bool includeHorizontalPadding = true,
  11. Duration loadMoreCooldown = const Duration(milliseconds: 250),
  12. int unseenQuiltTarget = 2,
  13. bool allowScalarTiles = true,
  14. bool allowHoles = false,
  15. int minTileWidth = 1,
  16. int minTileHeight = 1,
  17. double unknownExtentOfScreenMultiplier = 1.0,
})

Constructs a CarpetStyle with customizable tiling parameters.

Initializes defaults for responsive layouts, allowing overrides for specific use cases like grids or lists. The carpetWidthCalc enables dynamic column computation, while thresholds like unseenQuiltTarget control prefetching in Carpet widgets. Use with CarpetStyles for predefined configurations.

Implementation

const CarpetStyle(
    {this.maxSizeOptions = 10,
    this.maxQuiltHeight = 6,
    this.maxTileHeight = 3,
    this.maxTileWidth = 3,
    this.spacing = 8,
    this.carpetWidth = 5,
    this.carpetWidthCalc = _defaultCarpetWidthCalc,
    this.allowFutureFeeding = true,
    this.allowPastFeeding = true,
    this.includeHorizontalPadding = true,
    this.loadMoreCooldown = const Duration(milliseconds: 250),
    this.unseenQuiltTarget = 2,
    this.allowScalarTiles = true,
    this.allowHoles = false,
    this.minTileWidth = 1,
    this.minTileHeight = 1,
    this.unknownExtentOfScreenMultiplier = 1.0});