SliverWaterfallFlowDelegateWithFixedCrossAxisCount class

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

For example, if the grid is vertical, this delegate will create a layout with a fixed number of columns. If the grid is horizontal, this delegate will create a layout with a fixed number of rows.

This delegate creates grids with equally cross-axis sized and spaced tiles.

See also:

Inheritance

Constructors

SliverWaterfallFlowDelegateWithFixedCrossAxisCount({required int crossAxisCount, double mainAxisSpacing = 0.0, double crossAxisSpacing = 0.0, LastChildLayoutTypeBuilder? lastChildLayoutTypeBuilder, CollectGarbage? collectGarbage, ViewportBuilder? viewportBuilder, bool closeToTrailing = false})
Creates a delegate that makes masonry layouts with a fixed number of tiles in the cross axis.
const

Properties

closeToTrailing bool
when reverse property of List is true, layout is as following. it likes chat list, and new session will insert to zero index but it's not right when items are not full of viewport.
finalinherited
collectGarbage CollectGarbage?
Call when collect garbage, return indexes of children which are disposed to collect
finalinherited
crossAxisCount int
The number of children in the cross axis.
final
crossAxisSpacing double
The number of logical pixels between each child along the cross axis.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
lastChildLayoutTypeBuilder LastChildLayoutTypeBuilder?
The builder to get layout type of last child Notice: it should only for last child
finalinherited
mainAxisSpacing double
The number of logical pixels between each child along the main axis.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
viewportBuilder ViewportBuilder?
The builder to get indexes in viewport
finalinherited

Methods

getChildUsableCrossAxisExtent(SliverConstraints constraints) double
Return usable cross-axis extent of each child.
inherited
getCrossAxisCount(SliverConstraints constraints) int
Return crossAxisCount by SliverWaterfallFlowDelegateWithFixedCrossAxisCount and SliverWaterfallFlowDelegateWithMaxCrossAxisExtent.
override
getCrossAxisOffset(SliverConstraints constraints, int? crossAxisIndex) double
Return the offset of the child in the non-scrolling axis.
inherited
getLastChildLayoutType(int index) LastChildLayoutType
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRelayout(SliverWaterfallFlowDelegate oldDelegate) bool
Return true when the children need to be laid out.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited