clone method
DataRow
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,
Creates a copy of this row with the given fields replaced with new values.
Parameters that are null will keep their original values.
Implementation
DataRow 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,
}) {
return DataRow(
key: key ?? this.key,
selected: selected ?? this.selected,
onSelectChanged: onSelectChanged ?? this.onSelectChanged,
color: color ?? this.color,
decoration: decoration ?? this.decoration,
cells: cells ?? this.cells,
specificRowHeight: specificRowHeight ?? this.specificRowHeight,
onTap: onTap ?? this.onTap,
onDoubleTap: onDoubleTap ?? this.onDoubleTap,
onLongPress: onLongPress ?? this.onLongPress,
onSecondaryTap: onSecondaryTap ?? this.onSecondaryTap,
onSecondaryTapDown: onSecondaryTapDown ?? this.onSecondaryTapDown,
);
}