A GridDelegate that divides the grid's width evenly for a fixed number of columns.

Grids using this delegate cannot validly be placed inside an unconstrained horizontal space, since they attempt to divide the incoming horizontal maximum width constraint.

Inheritance

Constructors

FixedColumnCountGridDelegate({@required int columnCount, double columnSpacing: 0.0, double rowSpacing: 0.0, EdgeInsets padding: EdgeInsets.zero, double tileAspectRatio: 1.0 })

Creates a grid delegate that uses a fixed column count.

Properties

columnCount int

The number of columns in the grid.

read-only
tileAspectRatio double

The ratio of the width to the height of each tile in the grid.

read-only
columnSpacing double

The horizontal padding between columns.

read-only, inherited
hashCode int

Get a hash code for this object.

read-only, inherited
padding EdgeInsets

Insets for the entire grid.

read-only, inherited
rowSpacing double

The vertical padding between rows.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

getGridSpecification(BoxConstraints constraints, int childCount) GridSpecification

Override this method to control size of the columns and rows.

getMaxIntrinsicHeight(double width, int childCount) double

Returns the smallest height beyond which increasing the height never decreases the preferred width.

getMaxIntrinsicWidth(double height, int childCount) double

Returns the smallest width beyond which increasing the width never decreases the preferred height.

getMinIntrinsicHeight(double width, int childCount) double

Return the minimum height that this grid could be without failing to paint its contents within itself.

getMinIntrinsicWidth(double height, int childCount) double

Returns the minimum width that this grid could be without failing to paint its contents within itself.

shouldRelayout(FixedColumnCountGridDelegate oldDelegate) bool

Override this method to return true when the children need to be laid out.

getChildPlacement(GridSpecification specification, int index, Object placementData) GridChildPlacement

Override this method to control where children are placed in the grid.

inherited
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