WaterfallFlow.count constructor
WaterfallFlow.count({
- Key? key,
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- ScrollController? controller,
- bool? primary,
- ScrollPhysics? physics,
- bool shrinkWrap = false,
- EdgeInsetsGeometry? padding,
- required int crossAxisCount,
- double mainAxisSpacing = 0.0,
- double crossAxisSpacing = 0.0,
- bool addAutomaticKeepAlives = true,
- bool addRepaintBoundaries = true,
- bool addSemanticIndexes = true,
- double? cacheExtent,
- List<
Widget> children = const <Widget>[], - int? semanticChildCount,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
- LastChildLayoutTypeBuilder? lastChildLayoutTypeBuilder,
- CollectGarbage? collectGarbage,
- ViewportBuilder? viewportBuilder,
- bool closeToTrailing = false,
- String? restorationId,
- Clip clipBehavior = Clip.hardEdge,
Creates a scrollable, 2D array of widgets whose size is variable in the main axis with a fixed number of tiles in the cross axis.
Uses a SliverWaterfallFlowDelegate as the gridDelegate.
The addAutomaticKeepAlives
argument corresponds to the
SliverChildListDelegate.addAutomaticKeepAlives property. The
addRepaintBoundaries
argument corresponds to the
SliverChildListDelegate.addRepaintBoundaries property. Both must not be
null.
See also:
new SliverWaterfallFlow.count
, the equivalent constructor for SliverWaterfallFlow.
Implementation
WaterfallFlow.count({
Key? key,
Axis scrollDirection = Axis.vertical,
bool reverse = false,
ScrollController? controller,
bool? primary,
ScrollPhysics? physics,
bool shrinkWrap = false,
EdgeInsetsGeometry? padding,
required int crossAxisCount,
double mainAxisSpacing = 0.0,
double crossAxisSpacing = 0.0,
bool addAutomaticKeepAlives = true,
bool addRepaintBoundaries = true,
bool addSemanticIndexes = true,
double? cacheExtent,
List<Widget> children = const <Widget>[],
int? semanticChildCount,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
ScrollViewKeyboardDismissBehavior keyboardDismissBehavior =
ScrollViewKeyboardDismissBehavior.manual,
LastChildLayoutTypeBuilder? lastChildLayoutTypeBuilder,
CollectGarbage? collectGarbage,
ViewportBuilder? viewportBuilder,
bool closeToTrailing = false,
String? restorationId,
Clip clipBehavior = Clip.hardEdge,
}) : gridDelegate = SliverWaterfallFlowDelegateWithFixedCrossAxisCount(
crossAxisCount: crossAxisCount,
mainAxisSpacing: mainAxisSpacing,
crossAxisSpacing: crossAxisSpacing,
lastChildLayoutTypeBuilder: lastChildLayoutTypeBuilder,
collectGarbage: collectGarbage,
viewportBuilder: viewportBuilder,
closeToTrailing: closeToTrailing,
),
childrenDelegate = SliverChildListDelegate(
children,
addAutomaticKeepAlives: addAutomaticKeepAlives,
addRepaintBoundaries: addRepaintBoundaries,
addSemanticIndexes: addSemanticIndexes,
),
super(
key: key,
scrollDirection: scrollDirection,
reverse: reverse,
controller: controller,
primary: primary,
physics: physics,
shrinkWrap: shrinkWrap,
padding: padding,
cacheExtent: cacheExtent,
semanticChildCount: semanticChildCount ?? children.length,
dragStartBehavior: dragStartBehavior,
keyboardDismissBehavior: keyboardDismissBehavior,
restorationId: restorationId,
clipBehavior: clipBehavior,
);