clone method

DataRow2 clone({
  1. LocalKey? key,
  2. bool? selected,
  3. ValueChanged<bool?>? onSelectChanged,
  4. MaterialStateProperty<Color?>? color,
  5. Decoration? decoration,
  6. List<DataCell>? cells,
  7. double? specificRowHeight,
  8. GestureTapCallback? onTap,
  9. GestureTapCallback? onDoubleTap,
  10. GestureLongPressCallback? onLongPress,
  11. GestureTapCallback? onSecondaryTap,
  12. GestureTapDownCallback? onSecondaryTapDown,
})

Clone row, if non null values are provided - override the corresponding fields

Implementation

DataRow2 clone({
  LocalKey? key,
  bool? selected,
  ValueChanged<bool?>? onSelectChanged,
  MaterialStateProperty<Color?>? color,
  Decoration? decoration,
  List<DataCell>? cells,
  double? specificRowHeight,
  GestureTapCallback? onTap,
  GestureTapCallback? onDoubleTap,
  GestureLongPressCallback? onLongPress,
  GestureTapCallback? onSecondaryTap,
  GestureTapDownCallback? onSecondaryTapDown,
}) {
  return DataRow2(
    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,
  );
}