MDCMenuSurface class
A reusable surface that appears above the content of the page and can be positioned adjacent to an element.
Javascript: mdc.menuSurface.MDCMenuSurface
.
- Inheritance
-
- Object
- MDCComponent
- MDCMenuSurface
Constructors
- MDCMenuSurface(Element root, [MDCFoundation? foundation, dynamic args])
Properties
- foundation → MDCFoundation
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- js → MenuSurfaceComponent
-
The underlying Javascript component.
no setteroverride
- open ↔ bool?
-
getter/setter pair
- quickOpen ↔ bool?
-
getter/setter pair
- root → Element
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
destroy(
) → void -
Releases resources and removes any listeners.
inherited
-
emit(
String type, dynamic data, [bool shouldBubble = false]) → void -
inherited
-
hoistMenuToBody(
) → void - Removes the menu-surface element from the DOM and appends it to the body element. Should be used to overcome overflow: hidden issues.
-
listen(
String type, EventListener handler, {bool captureThis = false}) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAbsolutePosition(
num x, num y) → void -
setAnchorCorner(
int corner) → void - See AnchorCorner for acceptable values.
-
setAnchorMargin(
AnchorMargin margin) → void -
setFixedPosition(
bool isFixed) → void -
setIsHoisted(
bool hoisted) → void -
setMenuSurfaceAnchorElement(
Element root) → void - Changes the element used as an anchor for menu-surface positioning logic. Should be used with conjunction with hoistMenuToBody().
-
toString(
) → String -
A string representation of this object.
inherited
-
unlisten(
String type, EventListener handler, {bool captureThis = false}) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
attachTo(
Element root) → MDCMenuSurface
Constants
- closedEvent → const String
- openedEvent → const String