fetchRecitationVersesById method

Future<MyResponse<RecitationVerses>> fetchRecitationVersesById(
  1. int recitationId,
  2. int recitationVersesId
)

Implementation

Future<MyResponse<RecitationVerses>> fetchRecitationVersesById(int recitationId,int recitationVersesId) async {
  var response = await DioUtils.request(DioUtils.REQUEST_GET, "${Apis.FETCH_ALL_RECITATIONS}{$recitationId}/verses/$recitationVersesId");
  if (response.statusCode == 200) {
    return MyResponse<RecitationVerses>.fromJson(response.data,Apis.SINGLE);
  } else {
    return MyResponse<RecitationVerses>.init(Apis.CODE_ERROR, null, null);
  }
}