copyWith method

  1. @override
StarTransactionTypeBotPaidMediaSale copyWith({
  1. int? userId,
  2. List<PaidMedia>? media,
  3. String? payload,
  4. AffiliateInfo? affiliate()?,
})
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
StarTransactionTypeBotPaidMediaSale copyWith({
  int? userId,
  List<PaidMedia>? media,
  String? payload,
  AffiliateInfo? Function()? affiliate,
}) => StarTransactionTypeBotPaidMediaSale(
  userId: userId ?? this.userId,
  media: media ?? this.media,
  payload: payload ?? this.payload,
  affiliate: affiliate != null ? affiliate() : this.affiliate,
);