columnWidths property

Map<int, TableColumnWidth>? columnWidths

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.

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.

This property can never return null. If it is set to null, and the existing map is not empty, then the value is replaced by an empty map. (If it is set to null while the current value is an empty map, the value is not changed.)

Implementation

Map<int, TableColumnWidth>? get columnWidths => Map<int, TableColumnWidth>.unmodifiable(_columnWidths);
void columnWidths=(Map<int, TableColumnWidth>? value)

Implementation

set columnWidths(Map<int, TableColumnWidth>? value) {
  if (_columnWidths == value) {
    return;
  }
  if (_columnWidths.isEmpty && value == null) {
    return;
  }
  _columnWidths = value ?? HashMap<int, TableColumnWidth>();
  markNeedsLayout();
}