addPaymentLeg method

SplitSession addPaymentLeg(
  1. PaymentLeg leg
)

Returns a new session with the given payment leg added.

Implementation

SplitSession addPaymentLeg(PaymentLeg leg) {
  return SplitSession(
    splitId: splitId,
    orderTotal: orderTotal,
    explicitTipAmount: explicitTipAmount,
    paymentLegs: [...paymentLegs, leg],
  );
}