performSearch static method
dynamic
performSearch(
{ - String query = "",
- String displaylanguage = "eng",
- dynamic page = 1,
})
Implementation
static performSearch(
{String query = "", String displaylanguage = "eng", page = 1}) async {
String url =
"${AppUrls.baseUrlVCMS}/subscriber/v1/content/search?query=$query&displaylanguage=$displaylanguage&page=$page";
final response = await _dio!.get(url);
ContentModel contentModel;
if (response.data['errorcode'] == 7109) {
contentModel = ContentModel(totalcount: 0, data: []);
} else {
contentModel = ContentModel.fromMap(response.data);
}
return contentModel;
}