deleteAccount method
To delete user account in whitelabel app user needs to use below API
Implementation
Future<http.Response> deleteAccount() async {
Uri url = Uri.parse(
"$_baseUrl/user/delete/account/request/${SharedPreference.getUser()!.id}");
http.Response response =
await http.Client().get(url, headers: kAuthenticatedGetRequestHeader);
if (response.statusCode == 200) {
printMessage("DELETE ACCOUNT RESPONSE = ${response.body}");
return response;
} else {
printMessage("DELETE ACCOUNT RESPONSE = ${response.statusCode}");
printMessage("DELETE ACCOUNT RESPONSE = ${response.body}");
return response;
}
}