copyWith method

  1. @override
StarTransactionTypeBotSubscriptionPurchase copyWith({
  1. int? userId,
  2. int? subscriptionPeriod,
  3. ProductInfo? productInfo()?,
})
override

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

Implementation

@override
StarTransactionTypeBotSubscriptionPurchase copyWith({
  int? userId,
  int? subscriptionPeriod,
  ProductInfo? Function()? productInfo,
}) => StarTransactionTypeBotSubscriptionPurchase(
  userId: userId ?? this.userId,
  subscriptionPeriod: subscriptionPeriod ?? this.subscriptionPeriod,
  productInfo: productInfo != null ? productInfo() : this.productInfo,
);