RenderObjectElement class

An Element that owns a RenderObjectWidget, analogous to Flutter's RenderObjectElement.

Creates and manages the associated RenderObject lifecycle.

Inheritance
Implemented types
Implementers
Available extensions

Constructors

RenderObjectElement(RenderObjectWidget widget)
Creates a RenderObjectElement for the given widget.

Properties

dirty bool
Whether this element has been marked as needing to be rebuilt.
getter/setter pairinherited
focusManager FocusManager

Available on BuildContext, provided by the BuildContextNavigation extension

Returns the singleton FocusManager instance.
no setter
hashCode int
The hash code for this object.
no setterinherited

Available on BuildContext, provided by the BuildContextNavigation extension

Returns the NavigatorState of the nearest Navigator ancestor.
no setter
parent Element?
The parent of this element in the tree, or null if this is the root.
no setterinherited
renderObject RenderObject?
The RenderObject associated with this element, if any.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widget Widget
The current configuration of this element.
getter/setter pairinherited

Methods

dependOnInheritedWidgetOfExactType<T extends InheritedWidget>() → T?
Obtains the nearest InheritedWidget of type T and registers this element as a dependent so it rebuilds when the inherited widget changes.
inherited
findAncestorElementOfExactType<T extends InheritedWidget>() InheritedElement?
Returns the nearest InheritedElement of type T.
inherited
findAncestorWidgetOfExactType<T extends Widget>() → T?
Returns the nearest ancestor widget of the given type T.
inherited
markNeedsBuild() → void
Marks this element as needing to be rebuilt in the next frame.
inherited
mount(Element? parent) → void
Adds this element to the tree at the given parent.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unmount() → void
Removes this element from the tree and releases resources.
inherited
update(Widget newWidget) → void
Updates the widget configuration to newWidget.
override
updateChild(Element? child, Widget newWidget) Element?
Updates the given child to use the given newWidget, returning the updated or newly created child element.
inherited
visitChildren(void visitor(Element e)) → void
Calls visitor for each direct child of this element.
inherited

Operators

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