ElementWidget class
A bridge widget that maintains a persistent Element tree for its child.
Use this to embed reactive widgets (like StatefulWidgets or InheritedWidgets) inside immediate-mode rendering loops that reconstruct the widget tree on every frame.
Constructors
- ElementWidget(Widget child)
- Creates an element widget bridging the tree.
Properties
- child → Widget
-
The child widget.
final
- element → Element?
-
The root element of the embedded tree.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
The optional key for this widget.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → Element -
Creates an Element to manage this widget's location in the tree.
inherited
-
findState<
S extends State< (StatefulWidget> >) → S? - Finds a State of type S inside this widget's element tree.
-
getIntrinsicHeight(
int width) → int -
Computes the intrinsic height of this widget under the given
widthconstraint.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
Buffer buffer, Rect area) → void -
Renders the widget onto the provided
bufferwithin the specifiedarea.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited