getAllScreenTabs method

Future<List<ScreenableTab>> getAllScreenTabs({
  1. required int screenId,
  2. String? projectKey,
})

Returns the list of tabs for a screen.

Permissions required:

  • Administer Jira global permission.
  • Administer projects project permission when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme.

Implementation

Future<List<ScreenableTab>> getAllScreenTabs(
    {required int screenId, String? projectKey}) async {
  return (await _client.send(
    'get',
    'rest/api/3/screens/{screenId}/tabs',
    pathParameters: {
      'screenId': '$screenId',
    },
    queryParameters: {
      if (projectKey != null) 'projectKey': projectKey,
    },
  ) as List<Object?>)
      .map((i) =>
          ScreenableTab.fromJson(i as Map<String, Object?>? ?? const {}))
      .toList();
}