SliverGridLayout class Null safety
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:
- SliverGridRegularTileLayout, which represents a layout that uses equally sized and spaced tiles.
- SliverGridGeometry, which represents the size and position of a single tile in a grid.
- SliverGridDelegate.getLayout, which returns this object to describe the delegate's layout.
- RenderSliverGrid, which uses this class during its RenderSliverGrid.performLayout method.
- Implementers
- Annotations
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-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
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 intersects with (or is before) this scroll offset.
-
getMinChildIndexForScrollOffset(
double scrollOffset) → int - The minimum child index that intersects with (or is after) this scroll offset.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited