SliverWaterfallFlow.extent constructor
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,
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 forMasonryGridView
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));