getHomeData method
Implementation
Future getHomeData() async {
var decodedResponse;
try {
final response = await http.get(
Uri.parse('${WELLNESS_URL}api/employee-home-data'),
headers: {'Authorization': currentUserToken},
);
decodedResponse = json.decode(response.body);
if (decodedResponse['success'] == true) {
homeData = await decodedResponse;
getUserDetails(decodedResponse['profile_details']);
}
} catch (e) {
ErrorListner(
apiname: 'api/employee-home-data',
responsed: "${decodedResponse}",
request: "",
app_error: '${e}');
}
}