copyWith method
WCPDateSlotWidgetDecorations
copyWith({
- EdgeInsets? internalPadding,
- BorderRadius? borderRadius,
- WCPDSWDMultiStateColletion<
Border> ? selectedBorder, - WCPDSWDMultiStateColletion<
Border> ? notSelectedBorder, - WCPDSWDMultiStateColletion<
Color> ? selectedBackgroundColor, - WCPDSWDMultiStateColletion<
Color> ? notSelectedBackgroundColor, - WCPDSWDMultiStateColletion<
Color> ? selectedTextColor, - WCPDSWDMultiStateColletion<
Color> ? notSelectedTextColor, - WCPDSWDMultiStateColletion<
ZwapTextType> ? selectedTextType, - WCPDSWDMultiStateColletion<
ZwapTextType> ? notSelectedTextType, - WCPDSWDMultiStateColletion<
TextStyle> ? selectedTextStyle, - WCPDSWDMultiStateColletion<
TextStyle> ? notSelectedTextStyle, - required bool hasCustomTextStyle,
If hasCustomTextStyle
is true selectedTextColor
, notSelectedTextColor
, selectedTextType
, notSelectedTextType
will be null and only selectedTextStyle
and notSelectedTextStyle
will be copied
The expact dual case is hasCustomTextStyle
is false
Implementation
WCPDateSlotWidgetDecorations copyWith({
EdgeInsets? internalPadding,
BorderRadius? borderRadius,
WCPDSWDMultiStateColletion<Border>? selectedBorder,
WCPDSWDMultiStateColletion<Border>? notSelectedBorder,
WCPDSWDMultiStateColletion<Color>? selectedBackgroundColor,
WCPDSWDMultiStateColletion<Color>? notSelectedBackgroundColor,
WCPDSWDMultiStateColletion<Color>? selectedTextColor,
WCPDSWDMultiStateColletion<Color>? notSelectedTextColor,
WCPDSWDMultiStateColletion<ZwapTextType>? selectedTextType,
WCPDSWDMultiStateColletion<ZwapTextType>? notSelectedTextType,
WCPDSWDMultiStateColletion<TextStyle>? selectedTextStyle,
WCPDSWDMultiStateColletion<TextStyle>? notSelectedTextStyle,
required bool hasCustomTextStyle,
}) {
if (hasCustomTextStyle)
return WCPDateSlotWidgetDecorations.customTextStyle(
internalPadding: internalPadding ?? this.internalPadding,
borderRadius: borderRadius ?? this.borderRadius,
selectedBorder: selectedBorder ?? this.selectedBorder,
notSelectedBorder: notSelectedBorder ?? this.notSelectedBorder,
selectedBackgroundColor: selectedBackgroundColor ?? this.selectedBackgroundColor,
notSelectedBackgroundColor: notSelectedBackgroundColor ?? this.notSelectedBackgroundColor,
selectedTextStyle: selectedTextStyle ?? this.selectedTextStyle,
notSelectedTextStyle: notSelectedTextStyle ?? this.notSelectedTextStyle,
);
else
return WCPDateSlotWidgetDecorations(
internalPadding: internalPadding ?? this.internalPadding,
borderRadius: borderRadius ?? this.borderRadius,
selectedBorder: selectedBorder ?? this.selectedBorder,
notSelectedBorder: notSelectedBorder ?? this.notSelectedBorder,
selectedBackgroundColor: selectedBackgroundColor ?? this.selectedBackgroundColor,
notSelectedBackgroundColor: notSelectedBackgroundColor ?? this.notSelectedBackgroundColor,
selectedTextColor: selectedTextColor ?? this.selectedTextColor,
notSelectedTextColor: notSelectedTextColor ?? this.notSelectedTextColor,
selectedTextType: selectedTextType ?? this.selectedTextType,
notSelectedTextType: notSelectedTextType ?? this.notSelectedTextType,
);
}