copyWith method

DatePickerThemeData copyWith(
  1. {Color? backgroundColor,
  2. double? elevation,
  3. Color? shadowColor,
  4. Color? surfaceTintColor,
  5. ShapeBorder? shape,
  6. Color? headerBackgroundColor,
  7. Color? headerForegroundColor,
  8. TextStyle? headerHeadlineStyle,
  9. TextStyle? headerHelpStyle,
  10. TextStyle? weekdayStyle,
  11. TextStyle? dayStyle,
  12. MaterialStateProperty<Color?>? dayForegroundColor,
  13. MaterialStateProperty<Color?>? dayBackgroundColor,
  14. MaterialStateProperty<Color?>? dayOverlayColor,
  15. MaterialStateProperty<Color?>? todayForegroundColor,
  16. MaterialStateProperty<Color?>? todayBackgroundColor,
  17. BorderSide? todayBorder,
  18. TextStyle? yearStyle,
  19. MaterialStateProperty<Color?>? yearForegroundColor,
  20. MaterialStateProperty<Color?>? yearBackgroundColor,
  21. MaterialStateProperty<Color?>? yearOverlayColor,
  22. Color? rangePickerBackgroundColor,
  23. double? rangePickerElevation,
  24. Color? rangePickerShadowColor,
  25. Color? rangePickerSurfaceTintColor,
  26. ShapeBorder? rangePickerShape,
  27. Color? rangePickerHeaderBackgroundColor,
  28. Color? rangePickerHeaderForegroundColor,
  29. TextStyle? rangePickerHeaderHeadlineStyle,
  30. TextStyle? rangePickerHeaderHelpStyle,
  31. Color? rangeSelectionBackgroundColor,
  32. MaterialStateProperty<Color?>? rangeSelectionOverlayColor,
  33. Color? dividerColor,
  34. InputDecorationTheme? inputDecorationTheme,
  35. ButtonStyle? cancelButtonStyle,
  36. ButtonStyle? confirmButtonStyle}
)

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

Implementation

DatePickerThemeData copyWith({
  Color? backgroundColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  ShapeBorder? shape,
  Color? headerBackgroundColor,
  Color? headerForegroundColor,
  TextStyle? headerHeadlineStyle,
  TextStyle? headerHelpStyle,
  TextStyle? weekdayStyle,
  TextStyle? dayStyle,
  MaterialStateProperty<Color?>? dayForegroundColor,
  MaterialStateProperty<Color?>? dayBackgroundColor,
  MaterialStateProperty<Color?>? dayOverlayColor,
  MaterialStateProperty<Color?>? todayForegroundColor,
  MaterialStateProperty<Color?>? todayBackgroundColor,
  BorderSide? todayBorder,
  TextStyle? yearStyle,
  MaterialStateProperty<Color?>? yearForegroundColor,
  MaterialStateProperty<Color?>? yearBackgroundColor,
  MaterialStateProperty<Color?>? yearOverlayColor,
  Color? rangePickerBackgroundColor,
  double? rangePickerElevation,
  Color? rangePickerShadowColor,
  Color? rangePickerSurfaceTintColor,
  ShapeBorder? rangePickerShape,
  Color? rangePickerHeaderBackgroundColor,
  Color? rangePickerHeaderForegroundColor,
  TextStyle? rangePickerHeaderHeadlineStyle,
  TextStyle? rangePickerHeaderHelpStyle,
  Color? rangeSelectionBackgroundColor,
  MaterialStateProperty<Color?>? rangeSelectionOverlayColor,
  Color? dividerColor,
  InputDecorationTheme? inputDecorationTheme,
  ButtonStyle? cancelButtonStyle,
  ButtonStyle? confirmButtonStyle,
}) {
  return DatePickerThemeData(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    elevation: elevation ?? this.elevation,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    shape: shape ?? this.shape,
    headerBackgroundColor: headerBackgroundColor ?? this.headerBackgroundColor,
    headerForegroundColor: headerForegroundColor ?? this.headerForegroundColor,
    headerHeadlineStyle: headerHeadlineStyle ?? this.headerHeadlineStyle,
    headerHelpStyle: headerHelpStyle ?? this.headerHelpStyle,
    weekdayStyle: weekdayStyle ?? this.weekdayStyle,
    dayStyle: dayStyle ?? this.dayStyle,
    dayForegroundColor: dayForegroundColor ?? this.dayForegroundColor,
    dayBackgroundColor: dayBackgroundColor ?? this.dayBackgroundColor,
    dayOverlayColor: dayOverlayColor ?? this.dayOverlayColor,
    todayForegroundColor: todayForegroundColor ?? this.todayForegroundColor,
    todayBackgroundColor: todayBackgroundColor ?? this.todayBackgroundColor,
    todayBorder: todayBorder ?? this.todayBorder,
    yearStyle: yearStyle ?? this.yearStyle,
    yearForegroundColor: yearForegroundColor ?? this.yearForegroundColor,
    yearBackgroundColor: yearBackgroundColor ?? this.yearBackgroundColor,
    yearOverlayColor: yearOverlayColor ?? this.yearOverlayColor,
    rangePickerBackgroundColor: rangePickerBackgroundColor ?? this.rangePickerBackgroundColor,
    rangePickerElevation: rangePickerElevation ?? this.rangePickerElevation,
    rangePickerShadowColor: rangePickerShadowColor ?? this.rangePickerShadowColor,
    rangePickerSurfaceTintColor: rangePickerSurfaceTintColor ?? this.rangePickerSurfaceTintColor,
    rangePickerShape: rangePickerShape ?? this.rangePickerShape,
    rangePickerHeaderBackgroundColor: rangePickerHeaderBackgroundColor ?? this.rangePickerHeaderBackgroundColor,
    rangePickerHeaderForegroundColor: rangePickerHeaderForegroundColor ?? this.rangePickerHeaderForegroundColor,
    rangePickerHeaderHeadlineStyle: rangePickerHeaderHeadlineStyle ?? this.rangePickerHeaderHeadlineStyle,
    rangePickerHeaderHelpStyle: rangePickerHeaderHelpStyle ?? this.rangePickerHeaderHelpStyle,
    rangeSelectionBackgroundColor: rangeSelectionBackgroundColor ?? this.rangeSelectionBackgroundColor,
    rangeSelectionOverlayColor: rangeSelectionOverlayColor ?? this.rangeSelectionOverlayColor,
    dividerColor: dividerColor ?? this.dividerColor,
    inputDecorationTheme: inputDecorationTheme ?? this.inputDecorationTheme,
    cancelButtonStyle: cancelButtonStyle ?? this.cancelButtonStyle,
    confirmButtonStyle: confirmButtonStyle ?? this.confirmButtonStyle,
  );
}