CreateProperties class

Constructors

CreateProperties({ItemType? type, String? id, String? title, bool? checked, List<ContextType>? contexts, bool? visible, JSFunction<Function>? onclick, Object? parentId, List<String>? documentUrlPatterns, List<String>? targetUrlPatterns, bool? enabled})
CreateProperties.fromJS(CreateProperties _wrapped)

Properties

checked ↔ bool?
The initial state of a checkbox or radio button: true for selected, false for unselected. Only one radio button can be selected at a time in a given group.
getter/setter pair
contexts ↔ List<ContextType>?
List of contexts this menu item will appear in. Defaults to ['page'].
getter/setter pair
documentUrlPatterns ↔ List<String>?
Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns.
getter/setter pair
enabled ↔ bool?
Whether this context menu item is enabled or disabled. Defaults to true.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
id ↔ String?
The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension.
getter/setter pair
onclick ↔ JSFunction<Function>?
A function that is called back when the menu item is clicked. This is not available inside of a service worker; instead, they should register a listener for contextMenus.onClicked.
getter/setter pair
parentId ↔ Object?
The ID of a parent menu item; this makes the item a child of a previously added item.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
targetUrlPatterns ↔ List<String>?
Similar to documentUrlPatterns, filters based on the src attribute of img, audio, and video tags and the href attribute of a tags.
getter/setter pair
title ↔ String?
The text to display in the item; this is required unless type is separator. When the context is selection, use %s within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin".
getter/setter pair
toJS → CreateProperties
no setter
type ↔ ItemType?
The type of menu item. Defaults to normal.
getter/setter pair
visible ↔ bool?
Whether the item is visible in the menu.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited