removePromotion method

Future<void> removePromotion (
  1. PromotionRemovalRequest req
)

Implementation

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