InheritedModelElement<T> class
Methods
-
activate()
→ void
-
Transition from the "inactive" to the "active" lifecycle state.
inherited
-
attachNotificationTree()
→ void
-
Called in Element.mount and Element.activate to register this element in
the notification tree.
inherited
-
attachRenderObject()
→ void
-
inherited
-
deactivate()
→ void
-
Transition from the "active" to the "inactive" lifecycle state.
inherited
-
deactivateChild(Element child)
→ void
-
Move the given element to the list of inactive elements and detach its
render object from the render tree.
inherited
-
deactivateDependent(Element dependent)
→ void
-
inherited
-
dependOnInheritedComponentOfExactType<T extends InheritedComponent>({Object? aspect})
→ T?
-
Obtains the nearest component of the given type
T
, which must be the type of a
concrete InheritedComponent subclass, and registers this build context with
that component such that when that component changes (or a new component of that
type is introduced, or the component goes away), this build context is
rebuilt so that it can obtain new values from that component.
inherited
-
dependOnInheritedElement(InheritedElement ancestor, {Object? aspect})
→ InheritedComponent
-
Registers this build context with
ancestor
such that when
ancestor
's component changes this build context is rebuilt.
inherited
-
detachRenderObject()
→ void
-
inherited
-
didChangeDependencies()
→ void
-
Called when a dependency of this element changes.
inherited
-
didMount()
→ void
-
inherited
-
didRebuildDependent(Element dependent)
→ void
-
Called by Element after being rebuild.
This ensures that dependencies can react to elements that dynamically
do or don't depend to them.
inherited
-
didUpdate(covariant InheritedComponent oldComponent)
→ void
-
inherited
-
dispatchNotification(Notification notification)
→ void
-
Start bubbling this notification at the given build context.
inherited
-
findAncestorStateOfType<T extends State<StatefulComponent>>()
→ T?
-
Returns the State object of the nearest ancestor StatefulComponent component
that is an instance of the given type
T
.
inherited
-
forgetChild(Element child)
→ void
-
Remove the given child from the element's child list, in preparation for
the child being reused elsewhere in the element tree.
inherited
-
getDependencies(Element dependent)
→ Object?
-
Returns the dependencies value recorded for
dependent
with setDependencies.
inherited
-
getElementForInheritedComponentOfExactType<T extends InheritedComponent>()
→ InheritedElement?
-
Obtains the element corresponding to the nearest component of the given type
T
,
which must be the type of a concrete InheritedComponent subclass.
inherited
-
inflateComponent(Component newComponent, Element? prevSibling)
→ Element
-
Create an element for the given component and add it as a child of this
element.
inherited
-
markNeedsBuild()
→ void
-
Marks the element as dirty and schedules a rebuild.
inherited
-
mount(Element? parent, Element? prevSibling)
→ void
-
Add this element to the tree as a child of the given parent.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyClients(covariant InheritedComponent oldComponent)
→ void
-
Notifies all dependent elements that this inherited component has changed, by
calling Element.didChangeDependencies.
inherited
-
notifyDependent(covariant InheritedModel<T> oldComponent, Element dependent)
→ void
-
Called by notifyClients for each dependent.
override
-
performRebuild()
→ void
-
Cause the component to update itself.
inherited
-
rebuild()
→ void
-
Cause the component to update itself.
inherited
-
setDependencies(Element dependent, Object? value)
→ void
-
Sets the value returned by getDependencies value for
dependent
.
inherited
-
shouldRebuild(covariant ProxyComponent newComponent)
→ bool
-
Implement this method to determine whether a rebuild can be skipped.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
unmount()
→ void
-
Transition from the "inactive" to the "defunct" lifecycle state.
inherited
-
update(covariant Component newComponent)
→ void
-
Change the component used to configure this element.
inherited
-
updateChild(Element? child, Component? newComponent, Element? prevSibling)
→ Element?
-
Update the given child with the given new configuration.
inherited
-
updateChildren(List<Element> oldChildren, List<Component> newComponents, {Set<Element>? forgottenChildren})
→ List<Element>
-
Updates the children of this element to use new components.
inherited
-
updateDependencies(Element dependent, Object? aspect)
→ void
-
Called by dependOnInheritedComponentOfExactType when a new
dependent
is added.
override
-
updateLastChild(Element? child)
→ void
-
inherited
-
updatePrevSibling(Element? prevSibling)
→ void
-
inherited
-
visitAncestorElements(bool visitor(Element element))
→ void
-
Walks the ancestor chain, starting with the parent of this build context's
component, invoking the argument for each ancestor. The callback is given a
reference to the ancestor component's corresponding Element object. The
walk stops when it reaches the root component or when the callback returns
false. The callback must not return null.
inherited
-
visitChildElements(ElementVisitor visitor)
→ void
-
Wrapper around visitChildren for BuildContext.
inherited
-
visitChildren(ElementVisitor visitor)
→ void
-
Calls the argument for each child.
inherited