initCreditCard method
- CreditCardCreationRequest req,
- {bool silent: false}
Implementation
Future<void> initCreditCard(CreditCardCreationRequest req,
{bool silent = false}) async {
try {
status = DataBackendStatus.LOADING;
if (!silent) {
notifyListeners();
}
await initCreditCardInDatabase(req);
status = DataBackendStatus.OUTDATED;
creditCardsDirty = true;
if (!silent) {
notifyListeners();
}
} catch (err) {
print(err.toString());
status = DataBackendStatus.ERROR;
if (!silent) {
notifyListeners();
} else {
throw err;
}
}
}