RenderElement class abstract
An instantiation of a Widget at a particular location in the tree.
- Implemented types
- Implementers
Constructors
- RenderElement(Widget widget, RenderElement parent)
Properties
- appTargetId → String
-
App's target id.
final
- domNode → Element?
-
Associated DOM node.
no setter
- hasDomNode → bool
-
Whether current element has an associated dom node.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Associated widget's key.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- widget → Widget
-
The configuration for this render element.
no setteroverride
-
widgetChildren
→ List<
Widget> -
Child widgets of current widget(if any).
no setter
- widgetRuntimeType → String
-
Widget's runtime type.
no setteroverride
Methods
-
addRenderEventListeners(
Map< RenderEventType, RenderEventCallback> listeners) → void - Register RenderEvent listeners.
-
afterWidgetRebind(
{required Widget oldWidget, required Widget newWidget, required UpdateType updateType}) → void - After widget's rebind hook.
-
dependOnInheritedWidgetOfExactType<
T extends InheritedWidget> () → T? -
Obtains the nearest widget of the given type
T
, which must be the type of a concrete InheritedWidget subclass, and registers this build context with that widget such that when that widget changes (or a new widget of that type is introduced, or the widget goes away), this build context is rebuilt so that it can obtain new values from that widget.override -
findAncestorRenderElementOfExactType<
T extends RenderElement> () → T? -
Returns the nearest ancestor render element of the given type
T
, which must be the type of a concrete RenderElement subclass.override -
findAncestorStateOfType<
T extends State< (StatefulWidget> >) → T? -
Returns the State object of the nearest ancestor StatefulWidget widget
that is an instance of the given type
T
.override -
findAncestorWidgetOfExactType<
T extends Widget> () → T? -
Returns the nearest ancestor widget of the given type
T
, which must be the type of a concrete Widget subclass.override -
findClosestDomNode(
) → Element -
Returns dom node that's associated with the current context.
override
-
findClosestDomNodeInAncestors(
) → Element? -
Returns the nearest dom node in ancestors.
override
-
findClosestDomNodeInDescendants(
) → Element? -
Returns the nearest dom node in descendants.
override
-
findRootAncestorStateOfType<
T extends State< (StatefulWidget> >) → T? -
Returns the State object of the furthest ancestor StatefulWidget
widget that is an instance of the given type
T
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
) → void - Register hook.
-
render(
{required Widget widget}) → DomNodePatch? - Render hook.
-
setMetaInformation(
{required String informationId, required MetaInformation information}) → void -
Add or update document meta information.
override
-
toString(
) → String -
A string representation of this object.
override
-
traverseAncestorElements(
RenderElementCallback callback) → void -
Traverse the ancestor elements.
override
-
traverseChildElements(
RenderElementCallback callback) → void -
Traverse the child elements of this render element.
override
-
unsetMetaInformation(
{required String informationId}) → void -
Clear meta information associated with meta information id.
override
-
update(
{required UpdateType updateType, required Widget oldWidget, required Widget newWidget}) → DomNodePatch? - Update hook.
-
visitAncestorElements(
RenderElementVisitor visitor) → void -
Walks the ancestor chain, starting with the parent of this build context's
widget, invoking the argument for each ancestor. The callback is given a
reference to the ancestor widget's corresponding Element object. The
walk stops when it reaches the root widget or when the callback returns
false.
override
-
visitChildElements(
RenderElementVisitor visitor) → void -
Walks the children of this render element. The callback is given a
reference to the child widget's corresponding Element object. The
walk stops when it reaches the end of child or when the callback returns
false.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited