SliverStaggeredGridDelegateWithFixedCrossAxisCount class
Creates staggered grid layouts with a fixed number of cells 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 variable sized but equally spaced tiles.
See also:
- SliverStaggeredGridDelegate, which creates staggered grid layouts.
- StaggeredGridView, which can use this delegate to control the layout of its tiles.
- SliverStaggeredGrid, which can use this delegate to control the layout of its tiles.
- RenderSliverStaggeredGrid, which can use this delegate to control the layout of its tiles.
- Inheritance
-
- Object
- SliverStaggeredGridDelegate
- SliverStaggeredGridDelegateWithFixedCrossAxisCount
Constructors
- SliverStaggeredGridDelegateWithFixedCrossAxisCount({required int crossAxisCount, required IndexedStaggeredTileBuilder staggeredTileBuilder, double mainAxisSpacing = 0, double crossAxisSpacing = 0, int? staggeredTileCount})
-
Creates a delegate that makes staggered grid layouts with a fixed number
of tiles in the cross axis.
const
Properties
- 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
- 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
- staggeredTileBuilder → IndexedStaggeredTileBuilder
-
Called to get the tile at the specified index for the
RenderSliverStaggeredGrid.
finalinherited
- staggeredTileCount → int?
-
The total number of tiles this delegate can provide.
finalinherited
Methods
-
getConfiguration(
SliverConstraints constraints) → StaggeredGridConfiguration -
Returns information about the staggered grid configuration.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldRelayout(
covariant SliverStaggeredGridDelegateWithFixedCrossAxisCount oldDelegate) → bool -
Override this method to 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