DataRow class

Row configuration and cell data for a DataTable.

One row configuration must be provided for each row to display in the table. The list of DataRow objects is passed as the rows argument to the DataTable.new constructor.

The data for this row of the table is provided in the cells property of the DataRow object.

Annotations

Constructors

DataRow({LocalKey? key, bool selected = false, ValueChanged<bool?>? onSelectChanged, GestureLongPressCallback? onLongPress, MaterialStateProperty<Color?>? color, MaterialStateProperty<MouseCursor?>? mouseCursor, required List<DataCell> cells})
Creates the configuration for a row of a DataTable.
const
DataRow.byIndex({int? index, bool selected = false, ValueChanged<bool?>? onSelectChanged, GestureLongPressCallback? onLongPress, MaterialStateProperty<Color?>? color, MaterialStateProperty<MouseCursor?>? mouseCursor, required List<DataCell> cells})
Creates the configuration for a row of a DataTable, deriving the key from a row index.

Properties

cells List<DataCell>
The data for this row.
final
color MaterialStateProperty<Color?>?
The color for the row.
final
hashCode int
The hash code for this object.
no setterinherited
key LocalKey?
A Key that uniquely identifies this row. This is used to ensure that if a row is added or removed, any stateful widgets related to this row (e.g. an in-progress checkbox animation) remain on the right row visually.
final
mouseCursor MaterialStateProperty<MouseCursor?>?
The cursor for a mouse pointer when it enters or is hovering over the data row.
final
onLongPress GestureLongPressCallback?
Called if the row is long-pressed.
final
onSelectChanged ValueChanged<bool?>?
Called when the user selects or unselects a selectable row.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool
Whether the row is selected.
final

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