QueryInfo constructor
QueryInfo({})
Implementation
QueryInfo({
/// Whether the tabs are active in their windows.
bool? active,
/// Whether the tabs are pinned.
bool? pinned,
/// Whether the tabs are audible.
bool? audible,
/// Whether the tabs are muted.
bool? muted,
/// Whether the tabs are highlighted.
bool? highlighted,
/// Whether the tabs are discarded. A discarded tab is one whose content has
/// been unloaded from memory, but is still visible in the tab strip. Its
/// content is reloaded the next time it is activated.
bool? discarded,
/// Whether the tabs can be discarded automatically by the browser when
/// resources are low.
bool? autoDiscardable,
/// Whether the tabs are in the [current window](windows#current-window).
bool? currentWindow,
/// Whether the tabs are in the last focused window.
bool? lastFocusedWindow,
/// The tab loading status.
TabStatus? status,
/// Match page titles against a pattern. This property is ignored if the
/// extension does not have the `"tabs"` permission.
String? title,
/// Match tabs against one or more [URL patterns](match_patterns). Fragment
/// identifiers are not matched. This property is ignored if the extension
/// does not have the `"tabs"` permission.
Object? url,
/// The ID of the group that the tabs are in, or
/// [tabGroups.TAB_GROUP_ID_NONE] for ungrouped tabs.
int? groupId,
/// The ID of the parent window, or [windows.WINDOW_ID_CURRENT] for the
/// [current window](windows#current-window).
int? windowId,
/// The type of window the tabs are in.
WindowType? windowType,
/// The position of the tabs within their windows.
int? index,
}) : _wrapped = $js.QueryInfo(
active: active,
pinned: pinned,
audible: audible,
muted: muted,
highlighted: highlighted,
discarded: discarded,
autoDiscardable: autoDiscardable,
currentWindow: currentWindow,
lastFocusedWindow: lastFocusedWindow,
status: status?.toJS,
title: title,
url: switch (url) {
String() => url.jsify()!,
List() => url.toJSArrayString(),
null => null,
_ => throw UnsupportedError(
'Received type: ${url.runtimeType}. Supported types are: String, List<String>')
},
groupId: groupId,
windowId: windowId,
windowType: windowType?.toJS,
index: index,
);