postIgnoreSharedAnalytic method

  1. @override
Future<bool> postIgnoreSharedAnalytic(
  1. String analyticId,
  2. String vcode
)
override

Implementation

@override
Future<bool> postIgnoreSharedAnalytic(String analyticId, String vcode) async {
  try {
    final String body =
        json.encode({'analytic_id': analyticId, 'vcode': vcode});
    return await dio
        .post('${ApiEndpoints.SHARE}/3', data: body)
        .then((value) => true);
  } on Exception catch (e) {
    throw HttpHelper.decodeErrorResponse(e,
        tag: TAG,
        logger: logger,
        defaultErrorMessage: "Failed to discard this shared widget",
        meta: {
          'widget': analyticId,
          'vcode': vcode,
          'method': 'postIgnoreSharedAnalytic'
        });
  }
}