copyWith method

Data copyWith({
  1. String? type,
  2. String? header,
  3. String? ctaText,
  4. String? cta,
  5. String? bgColor,
  6. bool? gradient,
  7. String? headerTy,
  8. String? footerTy,
  9. String? headerTextColor,
  10. String? ctaTextColor,
  11. String? ctaColor,
  12. GradientColors? gradientObj,
})

Implementation

Data copyWith({
  String? type,
  String? header,
  String? ctaText,
  String? cta,
  String? bgColor,
  bool? gradient,
  String? headerTy,
  String? footerTy,
  String? headerTextColor,
  String? ctaTextColor,
  String? ctaColor,
  GradientColors? gradientObj,
}) {
  return Data(
    type: type ?? this.type,
    header: header ?? this.header,
    ctaText: ctaText ?? this.ctaText,
    cta: cta ?? this.cta,
    bgColor: bgColor ?? this.bgColor,
    gradient: gradient ?? this.gradient,
    headerTy: headerTy ?? this.headerTy,
    footerTy: footerTy ?? this.footerTy,
    headerTextColor: headerTextColor ?? this.headerTextColor,
    ctaTextColor: ctaTextColor ?? this.ctaTextColor,
    ctaColor: ctaColor ?? this.ctaColor,
    gradientObj: gradientObj ?? this.gradientObj,
  );
}