removeCreditCard method

Future<void> removeCreditCard (
  1. CreditCardRemovalRequest req
)

Implementation

Future<void> removeCreditCard(CreditCardRemovalRequest req) async {
  try {
    status = DataBackendStatus.LOADING;
    notifyListeners();
    await removeCreditCardFromDatabase(req);
    creditCardsDirty = true;
    status = DataBackendStatus.OUTDATED;
    notifyListeners();
  } catch (err) {
    print(err.toString());
    status = DataBackendStatus.ERROR;
    notifyListeners();
  }
}