updateGadget method

Future updateGadget({
  1. required int dashboardId,
  2. required int gadgetId,
  3. required DashboardGadgetUpdateRequest body,
})

Changes the title, position, and color of the gadget on a dashboard.

Permissions required: None.

Implementation

Future<dynamic> updateGadget(
    {required int dashboardId,
    required int gadgetId,
    required DashboardGadgetUpdateRequest body}) async {
  return await _client.send(
    'put',
    'rest/api/3/dashboard/{dashboardId}/gadget/{gadgetId}',
    pathParameters: {
      'dashboardId': '$dashboardId',
      'gadgetId': '$gadgetId',
    },
    body: body.toJson(),
  );
}