copyWith method
SfDataGridThemeData
copyWith({
- Brightness? brightness,
- Color? gridLineColor,
- double? gridLineStrokeWidth,
- Color? selectionColor,
- DataGridCurrentCellStyle? currentCellStyle,
- double? frozenPaneLineWidth,
- Color? frozenPaneLineColor,
- Color? sortIconColor,
- Color? headerHoverColor,
- Color? headerColor,
- double? frozenPaneElevation,
- Color? columnResizeIndicatorColor,
- double? columnResizeIndicatorStrokeWidth,
- Color? rowHoverColor,
- TextStyle? rowHoverTextStyle,
Creates a copy of this theme but with the given fields replaced with the new values.
Implementation
SfDataGridThemeData copyWith({
Brightness? brightness,
Color? gridLineColor,
double? gridLineStrokeWidth,
Color? selectionColor,
DataGridCurrentCellStyle? currentCellStyle,
double? frozenPaneLineWidth,
Color? frozenPaneLineColor,
Color? sortIconColor,
Color? headerHoverColor,
Color? headerColor,
double? frozenPaneElevation,
Color? columnResizeIndicatorColor,
double? columnResizeIndicatorStrokeWidth,
Color? rowHoverColor,
TextStyle? rowHoverTextStyle,
}) {
return SfDataGridThemeData.raw(
brightness: brightness ?? this.brightness,
gridLineColor: gridLineColor ?? this.gridLineColor,
gridLineStrokeWidth: gridLineStrokeWidth ?? this.gridLineStrokeWidth,
selectionColor: selectionColor ?? this.selectionColor,
currentCellStyle: currentCellStyle ?? this.currentCellStyle,
frozenPaneLineColor: frozenPaneLineColor ?? this.frozenPaneLineColor,
frozenPaneLineWidth: frozenPaneLineWidth ?? this.frozenPaneLineWidth,
sortIconColor: sortIconColor ?? this.sortIconColor,
headerColor: headerColor ?? this.headerColor,
headerHoverColor: headerHoverColor ?? this.headerHoverColor,
frozenPaneElevation: frozenPaneElevation ?? this.frozenPaneElevation,
columnResizeIndicatorColor:
columnResizeIndicatorColor ?? this.columnResizeIndicatorColor,
columnResizeIndicatorStrokeWidth: columnResizeIndicatorStrokeWidth ??
this.columnResizeIndicatorStrokeWidth,
rowHoverColor: rowHoverColor ?? this.rowHoverColor,
rowHoverTextStyle: rowHoverTextStyle ?? this.rowHoverTextStyle,
);
}