copyWith method
- @useResult
- FCalendarHeaderStyle headerStyle(
- FCalendarHeaderStyle style
- FCalendarDayPickerStyle dayPickerStyle(
- FCalendarDayPickerStyle style
- FCalendarEntryStyle yearMonthPickerStyle(
- FCalendarEntryStyle style
- BoxDecoration? decoration,
- EdgeInsetsGeometry? padding,
- Duration? pageAnimationDuration,
Returns a copy of this FCalendarStyle with the given properties replaced.
Consider using the CLI to generate a style.
Parameters
- FCalendarStyle.headerStyle - The header's style.
- FCalendarStyle.dayPickerStyle - The day picker's style.
- FCalendarStyle.yearMonthPickerStyle - The year/month picker's style.
- FCalendarStyle.decoration - The decoration surrounding the header & picker.
- FCalendarStyle.padding - The padding surrounding the header & picker.
- FCalendarStyle.pageAnimationDuration - The duration of the page switch animation.
Implementation
@useResult
FCalendarStyle copyWith({
FCalendarHeaderStyle Function(FCalendarHeaderStyle style)? headerStyle,
FCalendarDayPickerStyle Function(FCalendarDayPickerStyle style)? dayPickerStyle,
FCalendarEntryStyle Function(FCalendarEntryStyle style)? yearMonthPickerStyle,
BoxDecoration? decoration,
EdgeInsetsGeometry? padding,
Duration? pageAnimationDuration,
}) => FCalendarStyle(
headerStyle: headerStyle != null ? headerStyle(this.headerStyle) : this.headerStyle,
dayPickerStyle: dayPickerStyle != null ? dayPickerStyle(this.dayPickerStyle) : this.dayPickerStyle,
yearMonthPickerStyle: yearMonthPickerStyle != null
? yearMonthPickerStyle(this.yearMonthPickerStyle)
: this.yearMonthPickerStyle,
decoration: decoration ?? this.decoration,
padding: padding ?? this.padding,
pageAnimationDuration: pageAnimationDuration ?? this.pageAnimationDuration,
);