BlogArticlesDetails method

dynamic BlogArticlesDetails(
  1. dynamic id
)

Implementation

BlogArticlesDetails(id) async {
  var decodedResponse;
  final apibody = {"id": id.toString()};
  try {
    http.Response response =
        await http.post(Uri.parse('${SDK_BASE_URL}home_api/health_blog'),
            headers: {
              "Authorization": SignUpController.currentUserToken,
            },
            body: apibody);

    var decodedResponse = json.decode(response.body);
    blogsdetail = decodedResponse['health_feed'];
  } catch (e) {
    errorListner(
        apiname: 'home_api/health_blog',
        responsed: "${decodedResponse}",
        request: '${apibody}',
        app_error: '${e}');
  }
}