getRelatedContent static method

Future<ContentModel> getRelatedContent({
  1. required String contentid,
  2. String displaylanguage = "eng",
  3. int page = 1,
})

Implementation

static Future<ContentModel> getRelatedContent({
  required String contentid,
  String displaylanguage = "eng",
  int page = 1,
}) async {
  String url =
      "${AppUrls.baseUrlVCMS}/subscriber/v1/content/related/$contentid?displaylanguage=$displaylanguage&PAGE=$page";
  bool isSafari = await PlayService().isMpegtspackage();

  if (isSafari) {
    url = "$url&mpegtspackage=YES";
  }
  final response = await _dio!.get(url);
  ContentModel contentModel = ContentModel.fromMap(response.data);
  return contentModel;
}