copyWith method

CalendarTheme copyWith({
  1. Color? backgroundColor,
  2. Color? primaryColor,
  3. Color? textColor,
  4. Color? selectedColor,
  5. Color? dividerColor,
  6. Color? buttonColor,
  7. Color? buttonTextColor,
  8. Color? titleColor,
  9. Color? handleColor,
})

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

Returns a new CalendarTheme instance with the same values as this one, except for the fields that are explicitly provided.

Implementation

CalendarTheme copyWith({
  Color? backgroundColor,
  Color? primaryColor,
  Color? textColor,
  Color? selectedColor,
  Color? dividerColor,
  Color? buttonColor,
  Color? buttonTextColor,
  Color? titleColor,
  Color? handleColor,
}) {
  return CalendarTheme(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    primaryColor: primaryColor ?? this.primaryColor,
    textColor: textColor ?? this.textColor,
    selectedColor: selectedColor ?? this.selectedColor,
    dividerColor: dividerColor ?? this.dividerColor,
    buttonColor: buttonColor ?? this.buttonColor,
    buttonTextColor: buttonTextColor ?? this.buttonTextColor,
    titleColor: titleColor ?? this.titleColor,
    handleColor: handleColor ?? this.handleColor,
  );
}