addCreditCard method
Implementation
Future<void> addCreditCard(CreditCardCreationRequest req) async {
try {
status = DataBackendStatus.LOADING;
notifyListeners();
await addCreditCardToDatabase(req);
creditCardsDirty = true;
status = DataBackendStatus.OUTDATED;
notifyListeners();
status = DataBackendStatus.OUTDATED;
notifyListeners();
} catch (err) {
print(err.toString());
status = DataBackendStatus.ERROR;
notifyListeners();
}
}