getDiagnoSerachList method
Future
getDiagnoSerachList(
{ - dynamic SearchTXT,
})
Implementation
Future getDiagnoSerachList({SearchTXT}) async {
var decodedResponse;
try {
final response = await http.get(
Uri.parse(
'${WELLNESS_URL}api/diagnostic/diagnostic-search?query=${SearchTXT}'),
headers: {'Authorization': currentUserToken},
);
decodedResponse = json.decode(response.body);
if (response.statusCode == 200) {
DiagnoSerachList = await decodedResponse['data'];
} else {
DiagnoSerachList = [];
}
} catch (e) {
ErrorListner(
apiname: 'api/diagnostic/diagnostic-search?query=${SearchTXT}',
responsed: "${decodedResponse}",
request: "",
app_error: '${e}');
}
}