parseAdResponse method

AdResponse parseAdResponse(
  1. String responseBody
)

Implementation

AdResponse parseAdResponse(String responseBody) {
  try {
    final parsedJson = jsonDecode(responseBody);
    final restaurant = MainResponse.fromJson(parsedJson);
    return restaurant.response.first;
  } catch(error) {
    throw Exception(error);
  }

}