copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
PaymentReceipt copyWith({
String? title,
FormattedText? description,
Photo? Function()? photo,
int? date,
int? sellerBotUserId,
int? paymentProviderUserId,
Invoice? invoice,
OrderInfo? Function()? orderInfo,
ShippingOption? Function()? shippingOption,
String? credentialsTitle,
int? tipAmount,
dynamic extra,
int? clientId,
}) =>
PaymentReceipt(
title: title ?? this.title,
description: description ?? this.description,
photo: photo != null ? photo() : this.photo,
date: date ?? this.date,
sellerBotUserId: sellerBotUserId ?? this.sellerBotUserId,
paymentProviderUserId:
paymentProviderUserId ?? this.paymentProviderUserId,
invoice: invoice ?? this.invoice,
orderInfo: orderInfo != null ? orderInfo() : this.orderInfo,
shippingOption:
shippingOption != null ? shippingOption() : this.shippingOption,
credentialsTitle: credentialsTitle ?? this.credentialsTitle,
tipAmount: tipAmount ?? this.tipAmount,
extra: extra ?? this.extra,
clientId: clientId ?? this.clientId,
);