DataColumn class

An enhanced version of Flutter's standard DataColumn with additional sizing options.

This class extends Flutter's DataColumn with the ability to set relative column size via the size property or specify a fixed width in pixels. This allows for more precise control over column dimensions in a DataTable.

See also:

  • doc/component/data_table.md for more detailed documentation
  • DataTable, which uses these columns
  • ColumnSize, which defines the relative sizing options
Inheritance
Annotations

Constructors

DataColumn.new({required Widget label, String? tooltip, bool numeric = false, DataColumnSortCallback? onSort, ColumnSize size = ColumnSize.M, double? fixedWidth})
Creates the configuration for a column of a DataTable.
const

Properties

columnWidth TableColumnWidth?
How the horizontal extents of this column of the table should be determined.
finalinherited
fixedWidth double?
The absolute width of this column in pixels.
final
hashCode int
The hash code for this object.
no setterinherited
headingRowAlignment MainAxisAlignment?
Defines the horizontal layout of the label and sort indicator in the heading row.
finalinherited
label Widget
The column heading.
finalinherited
mouseCursor MaterialStateProperty<MouseCursor?>?
The cursor for a mouse pointer when it enters or is hovering over the heading row.
finalinherited
numeric bool
Whether this column represents numeric data or not.
finalinherited
onSort DataColumnSortCallback?
Called when the user asks to sort the table using this column.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size ColumnSize
The relative size of this column.
final
tooltip String?
The column heading's tooltip.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited