copyWith method
MessageInvoice
copyWith({
- String? title,
- FormattedText? description,
- Photo? photo()?,
- String? currency,
- int? totalAmount,
- String? startParameter,
- bool? isTest,
- bool? needShippingAddress,
- int? receiptMessageId,
- MessageExtendedMedia? extendedMedia()?,
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
MessageInvoice copyWith({
String? title,
FormattedText? description,
Photo? Function()? photo,
String? currency,
int? totalAmount,
String? startParameter,
bool? isTest,
bool? needShippingAddress,
int? receiptMessageId,
MessageExtendedMedia? Function()? extendedMedia,
}) =>
MessageInvoice(
title: title ?? this.title,
description: description ?? this.description,
photo: photo != null ? photo() : this.photo,
currency: currency ?? this.currency,
totalAmount: totalAmount ?? this.totalAmount,
startParameter: startParameter ?? this.startParameter,
isTest: isTest ?? this.isTest,
needShippingAddress: needShippingAddress ?? this.needShippingAddress,
receiptMessageId: receiptMessageId ?? this.receiptMessageId,
extendedMedia:
extendedMedia != null ? extendedMedia() : this.extendedMedia,
);