SliverGridDelegateWithFixedCrossAxisCount class
Creates grid 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 sized and spaced tiles.
See also:
- SliverGridDelegateWithMaxCrossAxisExtent, which creates a layout with tiles that have a maximum cross-axis extent.
- SliverGridDelegate, which creates arbitrary layouts.
- GridView, which can use this delegate to control the layout of its tiles.
- SliverGrid, which can use this delegate to control the layout of its tiles.
- RenderSliverGrid, which can use this delegate to control the layout of its tiles.
- Inheritance
- Object
- SliverGridDelegate
- SliverGridDelegateWithFixedCrossAxisCount
Constructors
Properties
- childAspectRatio → double
-
The ratio of the cross-axis to the main-axis extent of each child.
final
- 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.
final
- mainAxisSpacing → double
-
The number of logical pixels between each child along the main axis.
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
getLayout(
SliverConstraints constraints) → SliverGridLayout -
Returns information about the size and position of the tiles in the grid.
override
-
shouldRelayout(
covariant SliverGridDelegateWithFixedCrossAxisCount oldDelegate) → bool -
Override this method to return true when the children need to be
laid out. [...]
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited