A GridDelegate that fills the width with a variable number of tiles.

This delegate will select a tile width that is as large as possible subject to the following conditions:

  • The tile width evenly divides the width of the grid.
  • The tile width is at most maxTileWidth.
Inheritance

Constructors

MaxTileWidthGridDelegate({@required double maxTileWidth, double tileAspectRatio: 1.0, double columnSpacing: 0.0, double rowSpacing: 0.0, EdgeInsets padding: EdgeInsets.zero })

Creates a grid delegate that uses a max tile width.

Properties

maxTileWidth → double

The maximum width of a tile 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.

getMaxIntrinsicWidth(double height, int childCount) → double

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

getMinIntrinsicWidth(double height, int childCount) → double

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

shouldRelayout(MaxTileWidthGridDelegate 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
getMaxIntrinsicHeight(double width, int childCount) → double

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

inherited
getMinIntrinsicHeight(double width, int childCount) → double

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

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