setAmountToZeroById method

void setAmountToZeroById(
  1. String id
)

Implementation

void setAmountToZeroById(String id) {
  try {
    for (var modeItem in mode) {
      if (modeItem.paymentModeId == id) {
        modeItem.amountPaid?.amount = 0.0;
        return; // Exit the loop once found
      }
    }
  } catch (e) {
    debugPrint("Error setting amount: $e");
  }
}