columnCount property

  1. @override
int columnCount
override

The number of columns that the table has content for.

The buildColumn method will be called for indices smaller than the value provided here to learn more about the extent and visual appearance of a particular column. If null, the table will have an infinite number of columns, unless buildColumn returns null to signify the end.

The value returned by this getter may be an estimate of the total available columns, but buildColumn method must provide a valid TableSpan for all indices smaller than this integer.

The integer returned by this getter must be larger than (or equal to) the integer returned by pinnedColumnCount.

If the value returned by this getter changes throughout the lifetime of the delegate object, notifyListeners must be called.

When null, the number of columns will be infinite in number, unless null is returned from TableCellBuilderDelegate.columnBuilder. The TableCellListDelegate does not support an infinite number of columns.

Implementation

@override
int get columnCount => children.isEmpty ? 0 : children[0].length;