copyWith method
CheckoutState
copyWith({
- KeckPaymentMethod? paymentMethod,
- int? discountCents,
- int? tenderedCents,
- bool clearTendered = false,
- int? tipCents,
Implementation
CheckoutState copyWith({
KeckPaymentMethod? paymentMethod,
int? discountCents,
int? tenderedCents,
bool clearTendered = false,
int? tipCents,
}) =>
CheckoutState(
paymentMethod: paymentMethod ?? this.paymentMethod,
discountCents: discountCents ?? this.discountCents,
tenderedCents: clearTendered ? null : (tenderedCents ?? this.tenderedCents),
tipCents: tipCents ?? this.tipCents,
);