copyWith method
- 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<
OutlinedBorder?> ? dayShape, - 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,
- Locale? locale,
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<OutlinedBorder?>? dayShape,
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,
Locale? locale,
}) {
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,
dayShape: dayShape ?? this.dayShape,
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,
locale: locale ?? this.locale,
);
}