MenuItem class
A menu item used by an input method to interact with the user from the language menu.
class MenuItem extends ChromeObject { MenuItem({String id, String label, String style, bool visible, bool checked, bool enabled}) { if (id != null) this.id = id; if (label != null) this.label = label; if (style != null) this.style = style; if (visible != null) this.visible = visible; if (checked != null) this.checked = checked; if (enabled != null) this.enabled = enabled; } MenuItem.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy); /** * String that will be passed to callbacks referencing this MenuItem. */ String get id => jsProxy['id']; set id(String value) => jsProxy['id'] = value; /** * Text displayed in the menu for this item. */ String get label => jsProxy['label']; set label(String value) => jsProxy['label'] = value; /** * Enum representing if this item is: check, radio, or a separator. Radio * buttons between separators are considered grouped. * enum of `check`, `radio`, `separator` */ String get style => jsProxy['style']; set style(String value) => jsProxy['style'] = value; /** * Indicates this item is visible. */ bool get visible => jsProxy['visible']; set visible(bool value) => jsProxy['visible'] = value; /** * Indicates this item should be drawn with a check. */ bool get checked => jsProxy['checked']; set checked(bool value) => jsProxy['checked'] = value; /** * Indicates this item is enabled. */ bool get enabled => jsProxy['enabled']; set enabled(bool value) => jsProxy['enabled'] = value; }
Extends
ChromeObject > MenuItem
Constructors
new MenuItem({String id, String label, String style, bool visible, bool checked, bool enabled}) #
Create a new instance of a ChromeObject
, which creates and delegates to
a JsObject proxy.
docs inherited from ChromeObject
MenuItem({String id, String label, String style, bool visible, bool checked, bool enabled}) { if (id != null) this.id = id; if (label != null) this.label = label; if (style != null) this.style = style; if (visible != null) this.visible = visible; if (checked != null) this.checked = checked; if (enabled != null) this.enabled = enabled; }
new MenuItem.fromProxy(JsObject jsProxy) #
Create a new instance of a ChromeObject
, which delegates to the given
JsObject proxy.
docs inherited from ChromeObject
MenuItem.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);
Properties
bool checked #
Indicates this item should be drawn with a check.
bool get checked => jsProxy['checked'];
set checked(bool value) => jsProxy['checked'] = value;
bool enabled #
Indicates this item is enabled.
bool get enabled => jsProxy['enabled'];
set enabled(bool value) => jsProxy['enabled'] = value;
String id #
String that will be passed to callbacks referencing this MenuItem.
String get id => jsProxy['id'];
set id(String value) => jsProxy['id'] = value;
String label #
Text displayed in the menu for this item.
String get label => jsProxy['label'];
set label(String value) => jsProxy['label'] = value;
String style #
Enum representing if this item is: check, radio, or a separator. Radio
buttons between separators are considered grouped.
enum of check
, radio
, separator
String get style => jsProxy['style'];
set style(String value) => jsProxy['style'] = value;
bool visible #
Indicates this item is visible.
bool get visible => jsProxy['visible'];
set visible(bool value) => jsProxy['visible'] = value;
Methods
String toString() #
inherited from ChromeObject
Returns a string representation of this object.
docs inherited from Object
String toString() => jsProxy.toString();