characters method

Future<List<Map>> characters()

Implementation

Future<List<Map>> characters() async {
  // https://api.jikan.moe/v4/manga/32/characters
  try {
    final res = await _dio.get("$mangaId/characters");
    return res.data["data"];
  } on DioException catch (e) {
    if (e.response!.statusCode == 404) {
      throw NotFoundException();
    } else {
      throw BadResponseException();
    }
  }
}