Element class abstract
A mounted widget instance in the tree.
Properties
-
children
→ List<
Element> -
The child elements for this node, in paint order.
no setter
- context → BuildContext
-
final
- depth → int
-
Current depth from the tree root.
no setter
- hadBuildThisFrame → bool
-
Whether the BuildOwner managing this element had dirty elements
during the current frame's build phase.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- parent ↔ Element?
-
getter/setter pair
- renderObject → RenderObject?
-
The render object hosted by this element, or
null.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- widget ↔ Widget
-
getter/setter pair
Methods
-
build(
) → List< Widget> - Builds this element's child widget list.
-
captureMouse(
) → void - Captures mouse events for this element subtree.
-
dispatch(
Msg msg) → Cmd? - Dispatches a message through interception, children, then self handlers.
-
ensureBuilt(
) → void - Ensures the element is built before it is rendered.
-
markNeedsBuild(
) → void - Marks this element dirty so it participates in the next build scope.
-
markNeedsPaint(
) → void - Schedules a repaint and invalidates ancestor render caches.
-
markNeedsPaintScrollOnly(
) → void - Schedules a repaint for scroll-only changes.
-
mount(
Element? parent) → void -
Mounts this element under
parentand performs its initial build. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuild(
) → void - Rebuilds this element if it is currently dirty.
-
releaseMouse(
) → void - Releases mouse capture for this element subtree.
-
render(
{BoxConstraints? constraints}) → String - Renders this element subtree to a terminal string.
-
toString(
) → String -
A string representation of this object.
inherited
-
unmount(
) → void - Unmounts this element and all descendants.
-
update(
Widget newWidget) → void - Updates this element with a new widget configuration.
-
updateChildren(
List< Widget> newWidgets) → void - Reconcile old children with new widgets using Flutter's algorithm.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited