DataRow class Null safety

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, 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, 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.
read-onlyinherited
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
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.
read-onlyinherited
selected bool
Whether the row is selected.
final

Methods

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

Operators

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