SliverGridRegularTileLayout class Null safety
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:
- SliverGridDelegateWithFixedCrossAxisCount, which uses this layout.
- SliverGridDelegateWithMaxCrossAxisExtent, which uses this layout.
- SliverGridLayout, which represents an arbitrary tile layout.
- 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.
- Inheritance
-
- Object
- SliverGridLayout
- SliverGridRegularTileLayout
Constructors
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.
read-onlyinherited
- 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.
read-onlyinherited
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 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