unisearchDefualtList method

Future unisearchDefualtList()

Implementation

Future unisearchDefualtList() async {
  var decodedResponse;
  final ApiBody = {
    "universal_search": "par",
  };
  try {
    final response = await http.post(
      Uri.parse('${SDK_BASE_URL}api/universal_search/index'),
      body: ApiBody,
    );
    decodedResponse = json.decode(response.body);
    HospitalDefaultList = decodedResponse['hospital'];
    DoctorsDefaultList = decodedResponse['doctors'];
    TestNameDefaultList = decodedResponse['testname'];
  } catch (e) {
    errorListner(
        apiname: 'api/universal_search/index',
        responsed: "${decodedResponse}",
        request: "${ApiBody}",
        app_error: '${e}');
  }
}