copyWith method

SwayzeStyle copyWith({
  1. SwayzeHeaderPalette? defaultHeaderPalette,
  2. SwayzeHeaderPalette? selectedHeaderPalette,
  3. SwayzeHeaderPalette? highlightedHeaderPalette,
  4. Color? headerSeparatorColor,
  5. TextStyle? headerTextStyle,
  6. Color? defaultCellBackground,
  7. Color? cellSeparatorColor,
  8. double? cellSeparatorStrokeWidth,
  9. SelectionStyle? userSelectionStyle,
  10. Duration? selectionAnimationDuration,
  11. List<BoxShadow>? inlineEditorShadow,
})

Copy an instance of SwayzeStyle with certain modifications.

Use this to extend an existing style, such as defaultSwayzeStyle.

Implementation

SwayzeStyle copyWith({
  SwayzeHeaderPalette? defaultHeaderPalette,
  SwayzeHeaderPalette? selectedHeaderPalette,
  SwayzeHeaderPalette? highlightedHeaderPalette,
  Color? headerSeparatorColor,
  TextStyle? headerTextStyle,
  Color? defaultCellBackground,
  Color? cellSeparatorColor,
  double? cellSeparatorStrokeWidth,
  SelectionStyle? userSelectionStyle,
  Duration? selectionAnimationDuration,
  List<BoxShadow>? inlineEditorShadow,
}) {
  return SwayzeStyle(
    defaultHeaderPalette: defaultHeaderPalette ?? this.defaultHeaderPalette,
    selectedHeaderPalette:
        selectedHeaderPalette ?? this.selectedHeaderPalette,
    highlightedHeaderPalette:
        highlightedHeaderPalette ?? this.highlightedHeaderPalette,
    headerSeparatorColor: headerSeparatorColor ?? this.headerSeparatorColor,
    headerTextStyle: headerTextStyle ?? this.headerTextStyle,
    defaultCellBackground:
        defaultCellBackground ?? this.defaultCellBackground,
    cellSeparatorColor: cellSeparatorColor ?? this.cellSeparatorColor,
    cellSeparatorStrokeWidth:
        cellSeparatorStrokeWidth ?? this.cellSeparatorStrokeWidth,
    userSelectionStyle: userSelectionStyle ?? this.userSelectionStyle,
    selectionAnimationDuration:
        selectionAnimationDuration ?? this.selectionAnimationDuration,
    inlineEditorShadow: inlineEditorShadow ?? this.inlineEditorShadow,
  );
}