SliverWaterfallFlow.extent constructor

SliverWaterfallFlow.extent({
  1. Key? key,
  2. required double maxCrossAxisExtent,
  3. double mainAxisSpacing = 0.0,
  4. double crossAxisSpacing = 0.0,
  5. List<Widget> children = const <Widget>[],
  6. LastChildLayoutTypeBuilder? lastChildLayoutTypeBuilder,
  7. CollectGarbage? collectGarbage,
  8. ViewportBuilder? viewportBuilder,
  9. bool closeToTrailing = false,
})

Creates a sliver that places multiple box children in masonry layout with tiles that each have a maximum cross-axis extent.

Uses a SliverMasonryGridDelegateWithMaxCrossAxisExtent as the gridDelegate, and a SliverChildListDelegate as the delegate.

See also:

  • new MasonryGridView.extent, the equivalent constructor for MasonryGridView widgets.

Implementation

SliverWaterfallFlow.extent({
  Key? key,
  required double maxCrossAxisExtent,
  double mainAxisSpacing = 0.0,
  double crossAxisSpacing = 0.0,
  List<Widget> children = const <Widget>[],
  LastChildLayoutTypeBuilder? lastChildLayoutTypeBuilder,
  CollectGarbage? collectGarbage,
  ViewportBuilder? viewportBuilder,
  bool closeToTrailing = false,
})  : gridDelegate = SliverWaterfallFlowDelegateWithMaxCrossAxisExtent(
        maxCrossAxisExtent: maxCrossAxisExtent,
        mainAxisSpacing: mainAxisSpacing,
        crossAxisSpacing: crossAxisSpacing,
        lastChildLayoutTypeBuilder: lastChildLayoutTypeBuilder,
        collectGarbage: collectGarbage,
        viewportBuilder: viewportBuilder,
        closeToTrailing: closeToTrailing,
      ),
      super(key: key, delegate: SliverChildListDelegate(children));