fetchNarrationsList method

Future<MyResponse<Narration>> fetchNarrationsList()

Implementation

Future<MyResponse<Narration>> fetchNarrationsList() async {
  var response = await DioUtils.request(DioUtils.REQUEST_GET, Apis.FETCH_ALL_NARRATIONS);
  if (response.statusCode == 200) {
    return MyResponse<Narration>.fromJson(response.data,Apis.LIST);
  } else {
    return MyResponse<Narration>.init(Apis.CODE_ERROR, null, null);
  }
}