Element class abstract

Instantiated element in the widget tree that keeps track of widget updates and state.

Implemented types
Implementers

Constructors

Element(Widget widget)
Creates an element that uses the given widget as its configuration.

Properties

hashCode int
The hash code for this object.
no setterinherited
parent Element?
The parent element in the widget tree.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widget Widget
The widget that this element represents.
getter/setter pairoverride-getter

Methods

dependOnInheritedWidgetOfExactType<T extends InheritedWidget>() → T?
Obtains the nearest inherited widget of the given type T.
override
mount(Element? parent) → void
Adds this element to the tree as a child of parent.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Buffer buffer, Rect area) → void
Renders the underlying widget to the provided buffer within the area.
toString() String
A string representation of this object.
inherited
unmount() → void
Removes this element from the tree.
update(Widget newWidget) → void
Updates this element to use a new Widget configuration.
visitChildren(void visitor(Element child)) → void
Invokes visitor on each child element of this node.

Operators

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