GroupOptions constructor

GroupOptions({
  1. required Object tabIds,
  2. int? groupId,
  3. GroupOptionsCreateProperties? createProperties,
})

Implementation

GroupOptions({
  /// The tab ID or list of tab IDs to add to the specified group.
  required Object tabIds,

  /// The ID of the group to add the tabs to. If not specified, a new group
  /// will be created.
  int? groupId,

  /// Configurations for creating a group. Cannot be used if groupId is
  /// already specified.
  GroupOptionsCreateProperties? createProperties,
}) : _wrapped = $js.GroupOptions(
        tabIds: switch (tabIds) {
          int() => tabIds.jsify()!,
          List<int>() => tabIds.toJSArray((e) => e),
          _ => throw UnsupportedError(
              'Received type: ${tabIds.runtimeType}. Supported types are: int, List<int>')
        },
        groupId: groupId,
        createProperties: createProperties?.toJS,
      );