putDashboard method

  1. @override
Future<bool> putDashboard(
  1. DashboardProfile newProfile
)
override

Implementation

@override
Future<bool> putDashboard(DashboardProfile newProfile) async {
  try {
    return await dio
        .put('${ApiEndpoints.DASHBOARDS}/${newProfile.id}',
            data: json.encode(newProfile))
        .then((value) => true);
  } on Exception catch (e) {
    throw HttpHelper.decodeErrorResponse(e,
        tag: TAG,
        logger: logger,
        defaultErrorMessage: 'Failed to update dashboard profile',
        meta: {'profileId': newProfile.id, 'method': 'putDashboard'});
  }
}