withCustomerServed method

SplitEquallyState withCustomerServed()

Returns a new state with customersServed incremented by 1.

Implementation

SplitEquallyState withCustomerServed() {
  return SplitEquallyState(
    numberOfCustomers: numberOfCustomers,
    totalCents: totalCents,
    baseShareCents: baseShareCents,
    lastShareCents: lastShareCents,
    customersServed: customersServed + 1,
  );
}