surplusTipAmount property

Decimal get surplusTipAmount

Surplus (implicit) tip: the amount by which payments exceed the order total.

Implementation

Decimal get surplusTipAmount {
  final surplus = amountPaid - orderTotal;
  return surplus > Decimal.zero ? surplus : Decimal.zero;
}