SliverGridLayout class

The size and position of all the tiles in a RenderSliverGrid.

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.

The tiles can be placed arbitrarily, but it is more efficient to place tiles in roughly in order by scroll offset because grids reify a contiguous sequence of children.

See also:

Implemented by
Annotations
  • @immutable

Constructors

SliverGridLayout()
Abstract const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.
const

Properties

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. [...]
getGeometryForChildIndex(int index) SliverGridGeometry
The size and position of the child with the given index.
getMaxChildIndexForScrollOffset(double scrollOffset) → int
The maximum child index that is visible at (or before) this scroll offset.
getMinChildIndexForScrollOffset(double scrollOffset) → int
The minimum child index that is visible at (or after) this scroll offset.
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