fetchChapterById method
Implementation
Future<MyResponse<Chapter>> fetchChapterById(int chapterId) async {
var response = await DioUtils.request(DioUtils.REQUEST_GET, "${Apis.FETCH_ALL_CHAPTERS}$chapterId");
if (response.statusCode == 200) {
return MyResponse<Chapter>.fromJson(response.data,Apis.SINGLE);
} else {
return MyResponse<Chapter>.init(Apis.CODE_ERROR, null, null);
}
}