StatefulElement class
An element that manages a StatefulWidget and its State.
Constructors
- StatefulElement(StatefulWidget widget)
- Creates a stateful element to manage a StatefulWidget.
Properties
- childElement ↔ Element?
-
The child element.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- parent ↔ Element?
-
The parent element in the widget tree.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ State<
StatefulWidget> -
The state associated with this element.
latefinal
- widget ↔ Widget
-
The widget that this element represents.
getter/setter pairinherited
Methods
-
dependOnInheritedWidgetOfExactType<
T extends InheritedWidget> () → T? -
Obtains the nearest inherited widget of the given type
T.inherited -
mount(
Element? parent) → void -
Adds this element to the tree, creates the state, and builds the child.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuild(
) → void - Rebuilds the child widget configuration and updates the child element.
-
render(
Buffer buffer, Rect area) → void -
Renders the underlying widget to the provided
bufferwithin thearea.override -
toString(
) → String -
A string representation of this object.
inherited
-
unmount(
) → void -
Removes this element and disposes of the state.
override
-
update(
Widget newWidget) → void -
Updates the element with a new Widget and triggers a state update.
override
-
visitChildren(
void visitor(Element child)) → void -
Invokes
visitoron each child element of this node.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited