getUploadedPrescription method
Future
getUploadedPrescription(
)
Implementation
Future getUploadedPrescription() async {
var decodedResponse;
try {
final response = await http.get(
Uri.parse('${WELLNESS_URL}api/medicine/uploaded-prescriptions-list'),
headers: {'Authorization': currentUserToken},
);
decodedResponse = json.decode(response.body);
if (decodedResponse['success'] == true) {
getUploadedPrescriptionList = decodedResponse['data'];
} else {
getUploadedPrescriptionList = [];
}
} catch (e) {
ErrorListner(
apiname: 'api/medicine/uploaded-prescriptions-list',
responsed: "${decodedResponse}",
request: "",
app_error: '${e}');
}
}