copyWith method

PaywallElement copyWith({
  1. String? id,
  2. String? type,
  3. List<int>? padding,
  4. String? spacing,
  5. PaywallTopButton? topButton,
  6. String? background,
  7. String? offset,
  8. String? maskType,
  9. PaywallImageFile? imageFile,
  10. PaywallImageFile? iconFile,
  11. String? iconWidth,
  12. String? iconHeight,
  13. String? tintColor,
  14. int? maskHeight,
  15. int? imageHeight,
  16. List<int>? cornerRadius,
  17. String? color,
  18. String? fontId,
  19. String? hAlign,
  20. List<int>? margin,
  21. String? maxRows,
  22. String? stringId,
  23. String? onOverflow,
  24. PaywallText? text,
  25. String? title,
  26. PaywallAction? action,
  27. String? border,
  28. String? previewType,
  29. String? primaryFont,
  30. String? primaryColor,
  31. PaywallContentLayout? contentLayout,
  32. String? secondaryFont,
  33. String? secondaryColor,
  34. String? borderThickness,
  35. PaywallLinks? links,
  36. PaywallDivider? divider,
  37. PaywallTextStyle? textStyle,
  38. PaywallElementStates? states,
  39. String? groupBy,
  40. String? previewState,
  41. String? previewTextStyle,
  42. String? selectedPackageId,
  43. String? badge,
  44. PaywallBadgeStyle? badgeStyle,
  45. String? key,
  46. 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,
  );
}