SliverWaterfallFlow.count constructor
SliverWaterfallFlow.count({
- Key? key,
- required int crossAxisCount,
- 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 a two dimensional arrangement and masonry layout with a fixed number of tiles in the cross axis.
Uses a SliverWaterfallFlowDelegate as the gridDelegate, and a SliverChildListDelegate as the delegate.
See also:
new WaterfallFlow.count
, the equivalent constructor for WaterfallFlow widgets.
Implementation
SliverWaterfallFlow.count({
Key? key,
required int crossAxisCount,
double mainAxisSpacing = 0.0,
double crossAxisSpacing = 0.0,
List<Widget> children = const <Widget>[],
LastChildLayoutTypeBuilder? lastChildLayoutTypeBuilder,
CollectGarbage? collectGarbage,
ViewportBuilder? viewportBuilder,
bool closeToTrailing = false,
}) : gridDelegate = SliverWaterfallFlowDelegateWithFixedCrossAxisCount(
crossAxisCount: crossAxisCount,
mainAxisSpacing: mainAxisSpacing,
crossAxisSpacing: crossAxisSpacing,
lastChildLayoutTypeBuilder: lastChildLayoutTypeBuilder,
collectGarbage: collectGarbage,
viewportBuilder: viewportBuilder,
closeToTrailing: closeToTrailing,
),
super(key: key, delegate: SliverChildListDelegate(children));