LabTestSearch method

Future LabTestSearch({
  1. dynamic SearchTXT,
})

Implementation

Future LabTestSearch({SearchTXT}) async {
  var decodedResponse;
  var apibody = {
    "universal_search": "${SearchTXT}",
  };
  try {
    final response = await http.post(
      Uri.parse('${SDK_BASE_URL}universal_search_api'),
      body: apibody,
    );
    decodedResponse = json.decode(response.body);
    LabTestSearchList = decodedResponse['testname'];
  } catch (e) {
    errorListner(
        apiname: 'universal_search_api',
        responsed: "${decodedResponse}",
        request: '${apibody}',
        app_error: '${e}');
  }
}