getEarlyAccessQuestions method

Future<bool> getEarlyAccessQuestions()

Implementation

Future<bool> getEarlyAccessQuestions() async {
try {
  var response = await Requests.getDio(showLoadingDialog: false).get(
    "early-access/profile-types",
  );
  print(response.data.toString());

  if (response.statusCode == 200) {
    var data = response.data;

    earlyAccessQuestions.value = EarlyAccessQuestionnaire.fromJson(data);
    earlyAccessQuestions.refresh();
    return true;
  } else {
    throw Exception("Error fetching data");
  }
} catch (e) {
  CustomFlashWidget.showFlashMessage(
    type: FlashType.error,
    title: "Error",
    message: "Something unexpected happened. Please try again later!",
  );
  return false;
}
}