SliverAlignedGrid class

A sliver that places multiple box children in a two dimensional arrangement.

SliverAlignedGrid places its children in a grid where each track has the main axis extent of the widest child. Each child is stretched to match the track main axis extent.

Inheritance

Constructors

SliverAlignedGrid({Key? key, required NullableIndexedWidgetBuilder itemBuilder, int? itemCount, required SliverSimpleGridDelegate gridDelegate, double mainAxisSpacing = 0, double crossAxisSpacing = 0, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true})
Creates a custom SliverAlignedGrid.
const
SliverAlignedGrid.count({Key? key, required NullableIndexedWidgetBuilder itemBuilder, int? itemCount, required int crossAxisCount, double mainAxisSpacing = 0, double crossAxisSpacing = 0, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true})
Creates a sliver that places multiple box children in an aligned arrangement with a fixed number of tiles in the cross axis.
SliverAlignedGrid.extent({Key? key, required NullableIndexedWidgetBuilder itemBuilder, int? itemCount, required double maxCrossAxisExtent, double mainAxisSpacing = 0, double crossAxisSpacing = 0, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true})
Creates a sliver that places multiple box children in an aligned arrangement with tiles that each have a maximum cross-axis extent.

Properties

addAutomaticKeepAlives bool
Whether to wrap each child in an AutomaticKeepAlive.
final
addRepaintBoundaries bool
Whether to wrap each child in a RepaintBoundary.
final
crossAxisSpacing double
The number of pixels between each child along the cross axis.
final
gridDelegate SliverSimpleGridDelegate
The delegate that controls the size and position of the children.
final
hashCode int
The hash code for this object.
no setterinherited
itemBuilder NullableIndexedWidgetBuilder
Called to build children for the sliver.
final
itemCount int?
The total number of children this delegate can provide.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisSpacing double
The number of pixels between each child along the main axis.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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