copyWith method

ValidateOrderInfo copyWith({
  1. InputInvoice? inputInvoice,
  2. OrderInfo? orderInfo()?,
  3. bool? allowSave,
})

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

Implementation

ValidateOrderInfo copyWith({
  InputInvoice? inputInvoice,
  OrderInfo? Function()? orderInfo,
  bool? allowSave,
}) =>
    ValidateOrderInfo(
      inputInvoice: inputInvoice ?? this.inputInvoice,
      orderInfo: orderInfo != null ? orderInfo() : this.orderInfo,
      allowSave: allowSave ?? this.allowSave,
    );