copyWith method

SfThemeData copyWith({
  1. Brightness? brightness,
  2. SfPdfViewerThemeData? pdfViewerThemeData,
  3. SfChartThemeData? chartThemeData,
  4. SfCalendarThemeData? calendarThemeData,
  5. SfDataGridThemeData? dataGridThemeData,
  6. SfDateRangePickerThemeData? dateRangePickerThemeData,
  7. SfBarcodeThemeData? barcodeThemeData,
  8. SfGaugeThemeData? gaugeThemeData,
  9. SfSliderThemeData? sliderThemeData,
  10. SfRangeSelectorThemeData? rangeSelectorThemeData,
  11. SfRangeSliderThemeData? rangeSliderThemeData,
  12. SfMapsThemeData? mapsThemeData,
  13. SfDataPagerThemeData? dataPagerThemeData,
})

Creates a copy of this theme but with the given fields replaced with the new values.

Implementation

SfThemeData copyWith(
    {Brightness? brightness,
    SfPdfViewerThemeData? pdfViewerThemeData,
    SfChartThemeData? chartThemeData,
    SfCalendarThemeData? calendarThemeData,
    SfDataGridThemeData? dataGridThemeData,
    SfDateRangePickerThemeData? dateRangePickerThemeData,
    SfBarcodeThemeData? barcodeThemeData,
    SfGaugeThemeData? gaugeThemeData,
    SfSliderThemeData? sliderThemeData,
    SfRangeSelectorThemeData? rangeSelectorThemeData,
    SfRangeSliderThemeData? rangeSliderThemeData,
    SfMapsThemeData? mapsThemeData,
    SfDataPagerThemeData? dataPagerThemeData}) {
  return SfThemeData.raw(
      brightness: brightness ?? this.brightness,
      pdfViewerThemeData: pdfViewerThemeData ?? this.pdfViewerThemeData,
      chartThemeData: chartThemeData ?? this.chartThemeData,
      calendarThemeData: calendarThemeData ?? this.calendarThemeData,
      dataGridThemeData: dataGridThemeData ?? this.dataGridThemeData,
      dataPagerThemeData: dataPagerThemeData ?? this.dataPagerThemeData,
      dateRangePickerThemeData:
          dateRangePickerThemeData ?? this.dateRangePickerThemeData,
      barcodeThemeData: barcodeThemeData ?? this.barcodeThemeData,
      gaugeThemeData: gaugeThemeData ?? this.gaugeThemeData,
      sliderThemeData: sliderThemeData ?? this.sliderThemeData,
      rangeSelectorThemeData:
          rangeSelectorThemeData ?? this.rangeSelectorThemeData,
      rangeSliderThemeData: rangeSliderThemeData ?? this.rangeSliderThemeData,
      mapsThemeData: mapsThemeData ?? this.mapsThemeData);
}