postAnalyticsResources method
Implementation
@override
Future<bool> postAnalyticsResources(AnalyticResource analyticResource) async {
try {
final String body = json.encode({
'analytic_id': analyticResource.analyticId,
'resources': analyticResource.resources
});
return await dio
.post('${ApiEndpoints.ANALYTICS_RESOURCES}', data: body)
.then((value) => true);
} on Exception catch (e) {
throw HttpHelper.decodeErrorResponse(e,
tag: TAG,
logger: logger,
defaultErrorMessage: "Failed to update this widget resources",
meta: {
'widget': analyticResource.analyticId,
'method': 'postAnalyticsResources'
});
}
}