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,
  16. Widget? sortIcon,
  17. Widget? filterIcon,
  18. Color? filterIconColor,
  19. Color? filterIconHoverColor,
  20. Color? sortOrderNumberColor,
  21. Color? sortOrderNumberBackgroundColor,
  22. TextStyle? filterPopupTextStyle,
  23. TextStyle? filterPopupDisabledTextStyle}
)

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,
  Widget? sortIcon,
  Widget? filterIcon,
  Color? filterIconColor,
  Color? filterIconHoverColor,
  Color? sortOrderNumberColor,
  Color? sortOrderNumberBackgroundColor,
  TextStyle? filterPopupTextStyle,
  TextStyle? filterPopupDisabledTextStyle,
}) {
  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,
    sortIcon: sortIcon ?? this.sortIcon,
    filterIcon: filterIcon ?? this.filterIcon,
    filterIconColor: filterIconColor ?? this.filterIconColor,
    filterIconHoverColor: filterIconHoverColor ?? this.filterIconHoverColor,
    sortOrderNumberColor: sortOrderNumberColor ?? this.sortOrderNumberColor,
    sortOrderNumberBackgroundColor:
        sortOrderNumberBackgroundColor ?? this.sortOrderNumberBackgroundColor,
    filterPopupTextStyle: filterPopupTextStyle ?? this.filterPopupTextStyle,
    filterPopupDisabledTextStyle:
        filterPopupDisabledTextStyle ?? this.filterPopupDisabledTextStyle,
  );
}