copyWith method

PremiumState copyWith({
  1. FormattedText? state,
  2. List<PremiumStatePaymentOption>? paymentOptions,
  3. List<PremiumFeaturePromotionAnimation>? animations,
  4. List<BusinessFeaturePromotionAnimation>? businessAnimations,
  5. dynamic extra,
  6. int? clientId,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

PremiumState copyWith({
  FormattedText? state,
  List<PremiumStatePaymentOption>? paymentOptions,
  List<PremiumFeaturePromotionAnimation>? animations,
  List<BusinessFeaturePromotionAnimation>? businessAnimations,
  dynamic extra,
  int? clientId,
}) => PremiumState(
  state: state ?? this.state,
  paymentOptions: paymentOptions ?? this.paymentOptions,
  animations: animations ?? this.animations,
  businessAnimations: businessAnimations ?? this.businessAnimations,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);