SliverWaterfallFlowDelegateWithFixedCrossAxisCount constructor

const SliverWaterfallFlowDelegateWithFixedCrossAxisCount({
  1. required int crossAxisCount,
  2. double mainAxisSpacing = 0.0,
  3. double crossAxisSpacing = 0.0,
  4. LastChildLayoutTypeBuilder? lastChildLayoutTypeBuilder,
  5. CollectGarbage? collectGarbage,
  6. ViewportBuilder? viewportBuilder,
  7. bool closeToTrailing = false,

Creates a delegate that makes masonry layouts with a fixed number of tiles in the cross axis.

All of the arguments must not be null. The mainAxisSpacing and crossAxisSpacing arguments must not be negative.The crossAxisCount must be greater than zero.


const SliverWaterfallFlowDelegateWithFixedCrossAxisCount({
  required this.crossAxisCount,
  double mainAxisSpacing = 0.0,
  double crossAxisSpacing = 0.0,
  LastChildLayoutTypeBuilder? lastChildLayoutTypeBuilder,
  CollectGarbage? collectGarbage,
  ViewportBuilder? viewportBuilder,
  bool closeToTrailing = false,
})  : assert(crossAxisCount > 0),
        mainAxisSpacing: mainAxisSpacing,
        crossAxisSpacing: crossAxisSpacing,
        lastChildLayoutTypeBuilder: lastChildLayoutTypeBuilder,
        collectGarbage: collectGarbage,
        viewportBuilder: viewportBuilder,
        closeToTrailing: closeToTrailing,