columnWidths property

Map<int, TableColumnWidth>? columnWidths
final

How the horizontal extents of the columns of this table should be determined.

If the Map has a null entry for a given column, the table uses the defaultColumnWidth instead. By default, that uses flex sizing to distribute free space equally among the columns.

The FixedColumnWidth class can be used to specify a specific width in pixels. That is the cheapest way to size a table's columns.

The layout performance of the table depends critically on which column sizing algorithms are used here. In particular, IntrinsicColumnWidth is quite expensive because it needs to measure each cell in the column to determine the intrinsic size of the column.

The keys of this map (column indexes) are zero-based.

If this is set to null, then an empty map is assumed.

Implementation

final Map<int, TableColumnWidth>? columnWidths;