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
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
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

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 is visible at (or before) this scroll offset.
override
getMinChildIndexForScrollOffset(double scrollOffset) int
The minimum child index that is visible at (or after) this scroll offset.
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