fetchTimeSlot method
Implementation
Future fetchTimeSlot() async {
var decodedResponse;
try {
final response = await http.get(
Uri.parse('${WELLNESS_URL}api/diagnostic/fetch-time-slot'),
headers: {'Authorization': currentUserToken},
);
decodedResponse = json.decode(response.body);
if (decodedResponse['success'] == true) {
GetDateTime = decodedResponse['response'];
} else {
Get.back();
}
} catch (e) {
ErrorListner(
apiname: 'api/diagnostic/fetch-time-slot',
responsed: "${decodedResponse}",
request: "",
app_error: '${e}');
}
}