copyWith method
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,
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,
);
}