DataRow class

Extension of standard DataRow, adds row level tap events. Also there're onSecondaryTap and onSecondaryTapDown which are not available in DataCells and which can be useful in Desktop settings when a reaction to the right click is required.

Inheritance
Annotations

Constructors

DataRow({LocalKey? key, bool selected = false, ValueChanged<bool?>? onSelectChanged, WidgetStateProperty<Color?>? color, Decoration? decoration, required List<DataCell> cells, double? specificRowHeight, GestureTapCallback? onTap, GestureTapCallback? onDoubleTap, GestureLongPressCallback? onLongPress, GestureTapCallback? onSecondaryTap, GestureTapDownCallback? onSecondaryTapDown})
Creates the configuration for a row of a DataTable.
const
DataRow.byIndex({int? index, bool selected = false, ValueChanged<bool?>? onSelectChanged, WidgetStateProperty<Color?>? color, Decoration? decoration, required List<DataCell> cells, double? specificRowHeight, GestureTapCallback? onTap, GestureTapCallback? onDoubleTap, GestureLongPressCallback? onLongPress, GestureTapCallback? onSecondaryTap, GestureTapDownCallback? onSecondaryTapDown})

Properties

cells → List<DataCell>
The data for this row.
finalinherited
color → WidgetStateProperty<Color?>?
The color for the row.
finalinherited
decoration → Decoration?
Decoration to nbe applied to the given row. When applied, it DataTable.dividerThickness won't take effect
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.
finalinherited
mouseCursor → WidgetStateProperty<MouseCursor?>?
The cursor for a mouse pointer when it enters or is hovering over the data row.
finalinherited
onDoubleTap → GestureTapCallback?
Row double tap handler, won't be called if tapped cell has any tap event handlers
final
onHover → ValueChanged<bool>?
Called when a pointer enters or exits the row.
finalinherited
onLongPress → GestureTapCallback?
Called if the row is long-pressed.
finalinherited
onSecondaryTap → GestureTapCallback?
Row right click handler, won't be called if tapped cell has any tap event handlers
final
onSecondaryTapDown → GestureTapDownCallback?
Row right mouse down handler, won't be called if tapped cell has any tap event handlers
final
onSelectChanged → ValueChanged<bool?>?
Called when the user selects or unselects a selectable row.
finalinherited
onTap → GestureTapCallback?
Row tap handler, won't be called if tapped cell has any tap event handlers
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selected → bool
Whether the row is selected.
finalinherited
specificRowHeight → double?
Specific row height, which will be used only if provided. If not provided, dataRowHeight will be applied.
final

Methods

clone({LocalKey? key, bool? selected, ValueChanged<bool?>? onSelectChanged, WidgetStateProperty<Color?>? color, Decoration? decoration, List<DataCell>? cells, double? specificRowHeight, GestureTapCallback? onTap, GestureTapCallback? onDoubleTap, GestureLongPressCallback? onLongPress, GestureTapCallback? onSecondaryTap, GestureTapDownCallback? onSecondaryTapDown}) → DataRow
Clone row, if non null values are provided - override the corresponding fields
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