copyWith method
PaywallElement
copyWith({
- String? id,
- String? type,
- List<
int> ? padding, - String? spacing,
- PaywallTopButton? topButton,
- String? background,
- String? offset,
- String? maskType,
- PaywallImageFile? imageFile,
- PaywallImageFile? iconFile,
- String? iconWidth,
- String? iconHeight,
- String? tintColor,
- int? maskHeight,
- int? imageHeight,
- List<
int> ? cornerRadius, - String? color,
- String? fontId,
- String? hAlign,
- List<
int> ? margin, - String? maxRows,
- String? stringId,
- String? onOverflow,
- PaywallText? text,
- String? title,
- PaywallAction? action,
- String? border,
- String? previewType,
- String? primaryFont,
- String? primaryColor,
- PaywallContentLayout? contentLayout,
- String? secondaryFont,
- String? secondaryColor,
- String? borderThickness,
- PaywallLinks? links,
- PaywallDivider? divider,
- PaywallTextStyle? textStyle,
- PaywallElementStates? states,
- String? groupBy,
- String? previewState,
- String? previewTextStyle,
- String? selectedPackageId,
- String? badge,
- PaywallBadgeStyle? badgeStyle,
- String? key,
- PaywallConnector? connector,
Returns a new instance of PaywallElement with the provided fields replaced, while preserving the values of all unspecified fields.
Implementation
PaywallElement copyWith({
String? id,
String? type,
List<int>? padding,
String? spacing,
PaywallTopButton? topButton,
String? background,
String? offset,
String? maskType,
PaywallImageFile? imageFile,
PaywallImageFile? iconFile,
String? iconWidth,
String? iconHeight,
String? tintColor,
int? maskHeight,
int? imageHeight,
List<int>? cornerRadius,
String? color,
String? fontId,
String? hAlign,
List<int>? margin,
String? maxRows,
String? stringId,
String? onOverflow,
PaywallText? text,
String? title,
PaywallAction? action,
String? border,
String? previewType,
String? primaryFont,
String? primaryColor,
PaywallContentLayout? contentLayout,
String? secondaryFont,
String? secondaryColor,
String? borderThickness,
PaywallLinks? links,
PaywallDivider? divider,
PaywallTextStyle? textStyle,
PaywallElementStates? states,
String? groupBy,
String? previewState,
String? previewTextStyle,
String? selectedPackageId,
String? badge,
PaywallBadgeStyle? badgeStyle,
String? key,
PaywallConnector? connector,
}) {
return PaywallElement(
id: id ?? this.id,
type: type ?? this.type,
padding: padding ?? this.padding,
spacing: spacing ?? this.spacing,
topButton: topButton ?? this.topButton,
background: background ?? this.background,
offset: offset ?? this.offset,
maskType: maskType ?? this.maskType,
imageFile: imageFile ?? this.imageFile,
iconFile: iconFile ?? this.iconFile,
iconWidth: iconWidth ?? this.iconWidth,
iconHeight: iconHeight ?? this.iconHeight,
tintColor: tintColor ?? this.tintColor,
maskHeight: maskHeight ?? this.maskHeight,
imageHeight: imageHeight ?? this.imageHeight,
cornerRadius: cornerRadius ?? this.cornerRadius,
color: color ?? this.color,
fontId: fontId ?? this.fontId,
hAlign: hAlign ?? this.hAlign,
margin: margin ?? this.margin,
maxRows: maxRows ?? this.maxRows,
stringId: stringId ?? this.stringId,
onOverflow: onOverflow ?? this.onOverflow,
text: text ?? this.text,
title: title ?? this.title,
action: action ?? this.action,
border: border ?? this.border,
previewType: previewType ?? this.previewType,
primaryFont: primaryFont ?? this.primaryFont,
primaryColor: primaryColor ?? this.primaryColor,
contentLayout: contentLayout ?? this.contentLayout,
secondaryFont: secondaryFont ?? this.secondaryFont,
secondaryColor: secondaryColor ?? this.secondaryColor,
borderThickness: borderThickness ?? this.borderThickness,
links: links ?? this.links,
divider: divider ?? this.divider,
textStyle: textStyle ?? this.textStyle,
states: states ?? this.states,
groupBy: groupBy ?? this.groupBy,
previewState: previewState ?? this.previewState,
previewTextStyle: previewTextStyle ?? this.previewTextStyle,
selectedPackageId: selectedPackageId ?? this.selectedPackageId,
badge: badge ?? this.badge,
badgeStyle: badgeStyle ?? this.badgeStyle,
key: key ?? this.key,
connector: connector ?? this.connector,
);
}