getSurveyQuestions static method

Future getSurveyQuestions(
  1. dynamic scrg,
  2. String url,
  3. Map<String, String> urlHeaders,
  4. String uuid,
)

Implementation

static Future<dynamic> getSurveyQuestions(dynamic scrg, String url,
    Map<String, String> urlHeaders, String uuid) async {
  NetworkResponseData? response;

  try {
    response = await ApiHandler.getRequest(
      customHeaders: urlHeaders,
      url: url.replaceAll('{scrgval}', scrg).replaceAll('{uuidval}', uuid),
      apiFailureMessage: 'Unable to get tips',
    );
  } catch (apiRequestError) {
    PatientToast.showToast(message: apiRequestError.toString());
    return null;
  }

  return response.data!;
}