RenderObjectElement class abstract
Base for elements that own a RenderObject.
- Inheritance
- Implementers
- Available extensions
Constructors
Properties
- colors → ColorScheme
-
Available on BuildContext, provided by the FleuryThemeContext extension
Shorthand forTheme.of(this).colorScheme. Establishes a dependency on the same scope — equivalent to theme.colorScheme.no setter - depth → int
-
no setterinherited
- dirty → bool
-
no setterinherited
- elementParent → Element?
-
The element this one was mounted under, or null for the root.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- maybeRenderObject → RenderObject?
-
The render object, or null when this element never mounted one — an
inflate whose
createRenderObjectthrew, say.no setter - mounted → bool
-
True while the underlying element is in the tree.
no setterinherited
-
Available on BuildContext, provided by the NavigatorContext extension
The nearest NavigatorState.no setter - owner → BuildOwner
-
no setterinherited
- renderObject → RenderObject
-
The render object created by this element.
no setter
-
Available on BuildContext, provided by the NavigatorContext extension
The app's root NavigatorState.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- theme → ThemeData
-
Available on BuildContext, provided by the FleuryThemeContext extension
Shorthand forTheme.of(this). Establishes a dependency.no setter - widget → RenderObjectWidget
-
The widget currently mounted at this location.
no setteroverride
Methods
-
activate(
) → void -
Subclass hook mirroring State.activate; the default is a no-op.
inherited
-
activeChildOrNull(
Element? child) → Element? -
childif it is still this element's active child, else null.inherited -
attachRenderObject(
) → void -
Reattaches the render objects at the top of this subtree to the
nearest ancestor render object. Inverse of detachRenderObject.
override
-
deactivate(
) → void -
Subclass hook mirroring State.deactivate; the default is a no-op.
inherited
-
detachRenderObject(
) → void -
Detaches the render objects at the top of this subtree from the
ancestor render object. The default walks down through child elements;
RenderObjectElement overrides it to detach its own render object and
stop (the subtree below that render object travels with it).
override
-
findAncestorStateOfType<
T extends State< (StatefulWidget> >) → T? -
Walks ancestors looking for an Element whose state is of type
T. Does not establish a dependency.inherited -
findRenderObject(
) → RenderObject? -
Walks down through component elements until a render-object
element is found, returning that render object (or null when this
context isn't mounted or has no render-object descendant). Does
not establish a dependency.
inherited
-
forgetChild(
Element child) → void -
Called on this element's current parent when the element is being
reclaimed by a different parent (via a GlobalKey move) while still
active. The parent drops its reference so it won't later try to update
or unmount a child that has moved away. The default is a no-op (leaf
elements hold no children); container elements override it.
inherited
-
inflateWidget(
Widget newWidget) → Element -
Creates an element for
newWidgetand mounts it under this element.inherited -
insertChildRenderObject(
RenderObject child, RenderObjectElement element) → void -
Subclasses that hold children override this to install
childinto their own render object. Default throws; leaves don't hold children. -
listen<
T extends Listenable> (T source) → T -
Observes
sourceduring this widget's build and returns the same object.inherited -
markNeedsBuild(
) → void -
Marks this element as needing a rebuild on the next flush.
inherited
-
mount(
Element? parent) → void -
Inserts this element into the tree at the given parent.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performRebuild(
) → void -
Subclasses do the actual rebuild work here. The framework clears the
dirty bit BEFORE calling this method.
inherited
-
pop(
[Object? result]) → void -
Available on BuildContext, provided by the NavigatorContext extension
Pops the current screen with an optionalresult, ignoring PopScope (see NavigatorState.pop). -
popToRoot(
) → void -
Available on BuildContext, provided by the NavigatorContext extension
Pops every screen above the root. -
popUntil<
T extends Widget> () → void -
Available on BuildContext, provided by the NavigatorContext extension
Pops until the top screen is aT. -
present<
T> (Widget screen, {Alignment alignment = Alignment.center, RouteTransition? transition, Color? barrierColor, bool barrierDismissible = true}) → Future< T?> -
Available on BuildContext, provided by the NavigatorContext extension
Presentsscreenas a modal over the current screen (centered by default), on an opaque fill. Dismiss with pop.barrierColorfills the surround;barrierDismissible(default true) controls Esc. -
push<
T> (Widget screen, {RouteTransition? transition}) → Future< T?> -
Available on BuildContext, provided by the NavigatorContext extension
Pushesscreen; awaits its pop result. -
pushAndClear<
T> (Widget screen, {RouteTransition? transition}) → Future< T?> -
Available on BuildContext, provided by the NavigatorContext extension
Pushesscreenand clears the stack beneath it (the reset idiom). -
pushReplacement<
T> (Widget screen, {RouteTransition? transition, Object? result}) → Future< T?> -
Available on BuildContext, provided by the NavigatorContext extension
Replaces the current screen withscreen(the login → home idiom). -
rebuild(
{bool force = false}) → void -
Performs a rebuild if the element is dirty.
override
-
rebuildDirtyDescendants(
) → void -
Rebuilds the dirty elements below this one, shallowest first.
inherited
-
removeChildRenderObject(
RenderObject child) → void -
replaceChildWithError(
Element? child, Object error, StackTrace stack) → Element? -
Contains a child update that threw the way a thrown
buildis contained: reportserrorto BuildOwner.onBuildError and puts the owner's error widget in the slotchildoccupied.inherited -
runWithBuildTarget<
T> (T fn()) → T -
Runs
fnwith this element as the active build target (current), so listenables read inside it (context.listen,Animation.value) subscribe it for this build. Restores the previous target on the way out (stack discipline for nested builds). For any element that invokes a build callback — including outside the build phase (e.g. a layout-time builder).inherited -
scope<
T> () → T -
Reads the nearest Scope declared with type
Tand subscribes this widget to it.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
toStringDeep(
[String prefix = '']) → String -
Multi-line indented dump of this subtree, one element per line.
Intended for test failure messages — not for runtime logging.
inherited
-
toStringShallow(
) → String -
One-line description of this element. Includes runtime type, the
widget runtime type, and the key when present.
inherited
-
unmount(
) → void -
Removes this element from the tree permanently.
override
-
update(
covariant RenderObjectWidget newWidget) → void -
Replaces the widget configuration backing this element.
override
-
updateChild(
Element? child, Widget? newWidget) → Element? -
Reconciles a single child slot.
inherited
-
visitChildren(
void visitor(Element child)) → void -
Visits each direct child element.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited