copyWith method

  1. @override
UpdateNewPreCheckoutQuery copyWith({
  1. int? id,
  2. int? senderUserId,
  3. String? currency,
  4. int? totalAmount,
  5. String? invoicePayload,
  6. String? shippingOptionId,
  7. OrderInfo? orderInfo()?,
  8. dynamic extra,
  9. int? clientId,
})
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
UpdateNewPreCheckoutQuery copyWith({
  int? id,
  int? senderUserId,
  String? currency,
  int? totalAmount,
  String? invoicePayload,
  String? shippingOptionId,
  OrderInfo? Function()? orderInfo,
  dynamic extra,
  int? clientId,
}) => UpdateNewPreCheckoutQuery(
  id: id ?? this.id,
  senderUserId: senderUserId ?? this.senderUserId,
  currency: currency ?? this.currency,
  totalAmount: totalAmount ?? this.totalAmount,
  invoicePayload: invoicePayload ?? this.invoicePayload,
  shippingOptionId: shippingOptionId ?? this.shippingOptionId,
  orderInfo: orderInfo != null ? orderInfo() : this.orderInfo,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);