SliverGridRegularTileLayout class

A SliverGridLayout that uses equally sized and spaced tiles.

Rather that providing a grid with a SliverGridLayout directly, you instead provide the grid a SliverGridDelegate, which can compute a SliverGridLayout given the current SliverConstraints.

This layout is used by SliverGridDelegateWithFixedCrossAxisCount and SliverGridDelegateWithMaxCrossAxisExtent.

See also:

Inheritance

Constructors

SliverGridRegularTileLayout({required int crossAxisCount, required double mainAxisStride, required double crossAxisStride, required double childMainAxisExtent, required double childCrossAxisExtent, required bool reverseCrossAxis})
Creates a layout that uses equally sized and spaced tiles.
const

Properties

childCrossAxisExtent double
The number of pixels from the leading edge of one tile to the trailing edge of the same tile in the cross axis.
final
childMainAxisExtent double
The number of pixels from the leading edge of one tile to the trailing edge of the same tile in the main axis.
final
crossAxisCount int
The number of children in the cross axis.
final
crossAxisStride double
The number of pixels from the leading edge of one tile to the leading edge of the next tile in the cross axis.
final
hashCode int
The hash code for this object.
no setterinherited
mainAxisStride double
The number of pixels from the leading edge of one tile to the leading edge of the next tile in the main axis.
final
reverseCrossAxis bool
Whether the children should be placed in the opposite order of increasing coordinates in the cross axis.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

computeMaxScrollOffset(int childCount) double
The scroll extent needed to fully display all the tiles if there are childCount children in total.
override
getGeometryForChildIndex(int index) SliverGridGeometry
The size and position of the child with the given index.
override
getMaxChildIndexForScrollOffset(double scrollOffset) int
The maximum child index that intersects with (or is before) this scroll offset.
override
getMinChildIndexForScrollOffset(double scrollOffset) int
The minimum child index that intersects with (or is after) this scroll offset.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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