deleteAccountByUser static method
Implementation
static Future<void> deleteAccountByUser(String userId, {bool deleteNow = false}) async {
await initialize();
Map<String, dynamic> userData = {};
try {
if (deleteNow == false) {
await HycopFactory.account!.getAccountInfo(userId, userData);
} else {
await HycopFactory.account!.getRemovedAccountInfo(userId, userData);
}
} catch (error) {
logger.severe('AccountManager.deleteAccountByUser Failed !!! ${error.toString()}');
return;
}
await HycopFactory.account!.deleteAccountByUser(userData, deleteNow: deleteNow).catchError(
(error, stackTrace) => throw HycopUtils.getHycopException(
error: error, defaultMessage: 'AccountManager.deleteAccountByUser Failed !!!'));
}