getCommonFAQ method
Implementation
Future getCommonFAQ(String faqType) async {
var decodedResponse;
try {
final response = await http.get(
Uri.parse('${WELLNESS_URL}api/faq-master'),
headers: {'Authorization': currentUserToken},
);
decodedResponse = json.decode(response.body);
if (decodedResponse['success'] == true) {
var data = decodedResponse['data'];
if (data.containsKey(faqType)) {
getFAQData = data[faqType];
} else {
getFAQData = [];
}
}
} catch (e) {
ErrorListner(
apiname: 'api/faq-master',
responsed: "$decodedResponse",
request: "",
app_error: '$e',
);
}
}