copyWith method
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,
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);
}