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,
  24. double? columnDragIndicatorStrokeWidth,
  25. Color? columnDragIndicatorColor,
  26. Widget? groupExpanderIcon,
  27. double indentColumnWidth = 40.0,
  28. Color? indentColumnColor,
})

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,
  double? columnDragIndicatorStrokeWidth,
  Color? columnDragIndicatorColor,
  Widget? groupExpanderIcon,
  double indentColumnWidth = 40.0,
  Color? indentColumnColor,
}) {
  return SfDataGridThemeData.raw(
      brightness: 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,
      columnDragIndicatorColor:
          columnDragIndicatorColor ?? this.columnDragIndicatorColor,
      columnDragIndicatorStrokeWidth: columnDragIndicatorStrokeWidth ??
          this.columnDragIndicatorStrokeWidth,
      groupExpanderIcon: groupExpanderIcon ?? this.groupExpanderIcon,
      indentColumnWidth: indentColumnWidth,
      indentColumnColor: indentColumnColor ?? this.indentColumnColor);
}