ChromeAction class
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAvailable → bool
-
no setter
-
onClicked
→ EventStream<
Tab> -
Fired when an action icon is clicked. This event will not fire if the
action has a popup.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
disable(
int? tabId) → Future< void> -
Disables the action for a tab.
tabId
The id of the tab for which you want to modify the action. -
enable(
int? tabId) → Future< void> -
Enables the action for a tab. By default, actions are enabled.
tabId
The id of the tab for which you want to modify the action. -
getBadgeBackgroundColor(
TabDetails details) → Future< List< int> > - Gets the background color of the action.
-
getBadgeText(
TabDetails details) → Future< String> - Gets the badge text of the action. If no tab is specified, the non-tab-specific badge text is returned. If displayActionCountAsBadgeText is enabled, a placeholder text will be returned unless the declarativeNetRequestFeedback permission is present or tab-specific badge text was provided.
-
getBadgeTextColor(
TabDetails details) → Future< List< int> > - Gets the text color of the action.
-
getPopup(
TabDetails details) → Future< String> - Gets the html document set as the popup for this action.
-
getTitle(
TabDetails details) → Future< String> - Gets the title of the action.
-
getUserSettings(
) → Future< UserSettings> - Returns the user-specified settings relating to an extension's action.
-
isEnabled(
int? tabId) → Future< bool> -
Indicates whether the extension action is enabled for a tab (or globally
if no
tabId
is provided). Actions enabled using onlydeclarativeContent
always return false.tabId
The id of the tab for which you want check enabled status. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openPopup(
OpenPopupOptions? options) → Future< void> -
Opens the extension's popup.
options
Specifies options for opening the popup. -
setBadgeBackgroundColor(
SetBadgeBackgroundColorDetails details) → Future< void> - Sets the background color for the badge.
-
setBadgeText(
SetBadgeTextDetails details) → Future< void> - Sets the badge text for the action. The badge is displayed on top of the icon.
-
setBadgeTextColor(
SetBadgeTextColorDetails details) → Future< void> - Sets the text color for the badge.
-
setIcon(
SetIconDetails details) → Future< void> - Sets the icon for the action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
-
setPopup(
SetPopupDetails details) → Future< void> - Sets the HTML document to be opened as a popup when the user clicks on the action's icon.
-
setTitle(
SetTitleDetails details) → Future< void> - Sets the title of the action. This shows up in the tooltip.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited