copyWith method

SfCalendarThemeData copyWith({
  1. Brightness? brightness,
  2. Color? backgroundColor,
  3. TextStyle? headerTextStyle,
  4. Color? headerBackgroundColor,
  5. Color? agendaBackgroundColor,
  6. Color? cellBorderColor,
  7. TextStyle? viewHeaderDateTextStyle,
  8. TextStyle? viewHeaderDayTextStyle,
  9. TextStyle? agendaDayTextStyle,
  10. TextStyle? agendaDateTextStyle,
  11. TextStyle? timeTextStyle,
  12. TextStyle? activeDatesTextStyle,
  13. Color? activeDatesBackgroundColor,
  14. Color? todayBackgroundColor,
  15. Color? trailingDatesBackgroundColor,
  16. Color? leadingDatesBackgroundColor,
  17. TextStyle? trailingDatesTextStyle,
  18. TextStyle? blackoutDatesTextStyle,
  19. TextStyle? displayNameTextStyle,
  20. TextStyle? leadingDatesTextStyle,
  21. TextStyle? todayTextStyle,
  22. TextStyle? weekNumberTextStyle,
  23. TextStyle? timeIndicatorTextStyle,
  24. Color? todayHighlightColor,
  25. Color? viewHeaderBackgroundColor,
  26. Color? weekNumberBackgroundColor,
  27. Color? selectionBorderColor,
  28. Color? allDayPanelColor,
})

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

Implementation

SfCalendarThemeData copyWith(
    {Brightness? brightness,
    Color? backgroundColor,
    TextStyle? headerTextStyle,
    Color? headerBackgroundColor,
    Color? agendaBackgroundColor,
    Color? cellBorderColor,
    TextStyle? viewHeaderDateTextStyle,
    TextStyle? viewHeaderDayTextStyle,
    TextStyle? agendaDayTextStyle,
    TextStyle? agendaDateTextStyle,
    TextStyle? timeTextStyle,
    TextStyle? activeDatesTextStyle,
    Color? activeDatesBackgroundColor,
    Color? todayBackgroundColor,
    Color? trailingDatesBackgroundColor,
    Color? leadingDatesBackgroundColor,
    TextStyle? trailingDatesTextStyle,
    TextStyle? blackoutDatesTextStyle,
    TextStyle? displayNameTextStyle,
    TextStyle? leadingDatesTextStyle,
    TextStyle? todayTextStyle,
    TextStyle? weekNumberTextStyle,
    TextStyle? timeIndicatorTextStyle,
    Color? todayHighlightColor,
    Color? viewHeaderBackgroundColor,
    Color? weekNumberBackgroundColor,
    Color? selectionBorderColor,
    Color? allDayPanelColor}) {
  return SfCalendarThemeData.raw(
      brightness: brightness,
      backgroundColor: backgroundColor ?? this.backgroundColor,
      headerTextStyle: headerTextStyle ?? this.headerTextStyle,
      headerBackgroundColor:
          headerBackgroundColor ?? this.headerBackgroundColor,
      agendaBackgroundColor:
          agendaBackgroundColor ?? this.agendaBackgroundColor,
      cellBorderColor: cellBorderColor ?? this.cellBorderColor,
      viewHeaderDateTextStyle:
          viewHeaderDateTextStyle ?? this.viewHeaderDateTextStyle,
      viewHeaderDayTextStyle:
          viewHeaderDayTextStyle ?? this.viewHeaderDayTextStyle,
      agendaDayTextStyle: agendaDayTextStyle ?? this.agendaDayTextStyle,
      agendaDateTextStyle: agendaDateTextStyle ?? this.agendaDateTextStyle,
      timeTextStyle: timeTextStyle ?? this.timeTextStyle,
      activeDatesTextStyle: activeDatesTextStyle ?? this.activeDatesTextStyle,
      activeDatesBackgroundColor:
          activeDatesBackgroundColor ?? this.activeDatesBackgroundColor,
      todayBackgroundColor: todayBackgroundColor ?? this.todayBackgroundColor,
      trailingDatesBackgroundColor:
          trailingDatesBackgroundColor ?? this.trailingDatesBackgroundColor,
      leadingDatesBackgroundColor:
          leadingDatesBackgroundColor ?? this.leadingDatesBackgroundColor,
      trailingDatesTextStyle:
          trailingDatesTextStyle ?? this.trailingDatesTextStyle,
      blackoutDatesTextStyle:
          blackoutDatesTextStyle ?? this.blackoutDatesTextStyle,
      displayNameTextStyle: displayNameTextStyle ?? this.displayNameTextStyle,
      leadingDatesTextStyle:
          leadingDatesTextStyle ?? this.leadingDatesTextStyle,
      todayTextStyle: todayTextStyle ?? this.todayTextStyle,
      weekNumberTextStyle: weekNumberTextStyle ?? this.weekNumberTextStyle,
      todayHighlightColor: todayHighlightColor ?? this.todayHighlightColor,
      timeIndicatorTextStyle:
          timeIndicatorTextStyle ?? this.timeIndicatorTextStyle,
      viewHeaderBackgroundColor:
          viewHeaderBackgroundColor ?? this.viewHeaderBackgroundColor,
      weekNumberBackgroundColor:
          weekNumberBackgroundColor ?? this.weekNumberBackgroundColor,
      selectionBorderColor: selectionBorderColor ?? this.selectionBorderColor,
      allDayPanelColor: allDayPanelColor ?? this.allDayPanelColor);
}