userDetail function
Implementation
Future<ProfileResponse> userDetail() async {
appStore.setLoading(true);
try {
ProfileResponse res = ProfileResponse.fromMap(await handleResponse(await buildHttpResponse("${APIEndPoint.userDetail}?user_id=${appStore.userId}", method: HttpMethod.GET)));
appStore.setLoading(false);
await saveUserData(res.data!.userData!);
return res;
} catch (e) {
appStore.setLoading(false);
throw errorSomethingWentWrong;
}
}