copyWith method

SfDataGridThemeData copyWith({
  1. Brightness? brightness,
  2. Color? gridLineColor,
  3. double? gridLineStrokeWidth,
  4. Color? selectionColor,
  5. DataGridCurrentCellStyle? currentCellStyle,
  6. double? frozenPaneLineWidth,
  7. Color? frozenPaneLineColor,
  8. Color? sortIconColor,
  9. Color? headerHoverColor,
  10. Color? headerColor,
  11. double? frozenPaneElevation,
  12. Color? columnResizeIndicatorColor,
  13. double? columnResizeIndicatorStrokeWidth,
  14. Color? rowHoverColor,
  15. 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,
  );
}