AnimatedSliverMultiBoxAdaptorElement class
An element that lazily builds children for a SliverMultiBoxAdaptorWidget.
Implements RenderSliverBoxChildManager, which lets this element manage the children of subclasses of RenderSliverMultiBoxAdaptor.
This class takes the implementation of the standard SliverMultiBoxAdaptorElement class and provides support for animations in face of list changes.
- Inheritance
- Object
- DiagnosticableTree
- Element
- RenderObjectElement
- AnimatedSliverMultiBoxAdaptorElement
- Implemented types
Constructors
- AnimatedSliverMultiBoxAdaptorElement(AnimatedSliverList widget)
- Creates an element that lazily builds children for the given widget with support for animations in response to changes to the list.
Properties
- childCount → int
-
Copied from SliverMultiBoxAdaptorElement.childCount.
The final count will be changed to take in account the last invisibile boundary item and
the items taken by all intervals.
read-only, override
- debugDoingBuild → bool
-
Whether the widget is currently updating the widget or render tree. [...]
read-only, inherited
- depth → int
-
An integer that is guaranteed to be greater than the parent's, if any.
The element at the root of the tree must have a depth greater than 0.
read-only, inherited
- dirty → bool
-
Returns true if the element has been marked as needing rebuilding.
read-only, inherited
- estimatedChildCount → int
-
read-only
- hashCode → int
-
The hash code for this object. [...]
@nonVirtual, read-only, inherited
- owner → BuildOwner
-
The object that manages the lifecycle of this element.
read-only, inherited
- renderObject → AnimatedRenderSliverList
-
The underlying RenderObject for this element.
read-only, override
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- size → Size
-
The size of the RenderBox returned by findRenderObject. [...]
read-only, inherited
- slot → dynamic
-
Information set by parent to define where this child fits in its parent's
child list. [...]
read-only, inherited
- widget → AnimatedSliverList
-
The configuration for this element.
read-only, override
Methods
-
activate(
) → void -
Transition from the "inactive" to the "active" lifecycle state. [...]
@mustCallSuper, inherited
-
ancestorInheritedElementForWidgetOfExactType(
Type targetType) → InheritedElement -
Obtains the element corresponding to the nearest widget of the given type,
which must be the type of a concrete InheritedWidget subclass. [...]
@Deprecated('Use getElementForInheritedWidgetOfExactType instead. ' 'This feature was deprecated after v1.12.1.'), inherited
-
ancestorRenderObjectOfType(
TypeMatcher matcher) → RenderObject -
Returns the RenderObject object of the nearest ancestor RenderObjectWidget widget
that matches the given TypeMatcher. [...]
@Deprecated('Use findAncestorRenderObjectOfType instead. ' 'This feature was deprecated after v1.12.1.'), inherited
-
ancestorStateOfType(
TypeMatcher matcher) → State< StatefulWidget> -
Returns the State object of the nearest ancestor StatefulWidget widget
that matches the given TypeMatcher. [...]
@Deprecated('Use findAncestorStateOfType instead. ' 'This feature was deprecated after v1.12.1.'), inherited
-
ancestorWidgetOfExactType(
Type targetType) → Widget -
Returns the nearest ancestor widget of the given type, which must be the
type of a concrete Widget subclass. [...]
@Deprecated('Use findAncestorWidgetOfExactType instead. ' 'This feature was deprecated after v1.12.1.'), inherited
-
attachRenderObject(
dynamic newSlot) → void -
Add renderObject to the render tree at the location specified by
newSlot
. [...]inherited -
createChild(
int index, {RenderBox after}) → void -
Copied from SliverMultiBoxAdaptorElement.createChild.
override
-
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. [...]
@protected, inherited
-
debugAssertChildListLocked(
) → bool -
Copied from SliverMultiBoxAdaptorElement.debugAssertChildListLocked.
override
-
debugDeactivated(
) → void -
Called, in debug mode, after children have been deactivated (see deactivate). [...]
@mustCallSuper, inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children. [...]
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node. [...]
inherited
-
debugGetCreatorChain(
int limit) → String -
Returns a description of what caused this element to be created. [...]
inherited
-
debugGetDiagnosticChain(
) → List< Element> -
Returns the parent chain from this element back to the root of the tree. [...]
inherited
-
debugVisitOnstageChildren(
ElementVisitor visitor) → void -
Copied from SliverMultiBoxAdaptorElement.debugVisitOnstageChildren.
override
-
dependOnInheritedElement(
InheritedElement ancestor, {Object aspect}) → InheritedWidget -
Registers this build context with
ancestor
such that whenancestor
's widget changes this build context is rebuilt. [...]inherited -
dependOnInheritedWidgetOfExactType<
T extends InheritedWidget> ({Object aspect}) → T -
Obtains the nearest widget of the given type
T
, which must be the type of a concrete InheritedWidget subclass, and registers this build context with that widget such that when that widget changes (or a new widget of that type is introduced, or the widget goes away), this build context is rebuilt so that it can obtain new values from that widget. [...]inherited -
describeElement(
String name, {DiagnosticsTreeStyle style: DiagnosticsTreeStyle.errorProperty}) → DiagnosticsNode -
Returns a description of an Element from the current build context.
inherited
-
describeMissingAncestor(
{required Type expectedAncestorType}) → List< DiagnosticsNode> -
Adds a description of a specific type of widget missing from the current
build context's ancestry tree. [...]
inherited
-
describeOwnershipChain(
String name) → DiagnosticsNode -
Adds a description of the ownership chain from a specific Element
to the error report. [...]
inherited
-
describeWidget(
String name, {DiagnosticsTreeStyle style: DiagnosticsTreeStyle.errorProperty}) → DiagnosticsNode -
Returns a description of the Widget associated with the current build context.
inherited
-
detachRenderObject(
) → void -
Remove renderObject from the render tree. [...]
inherited
-
didAdoptChild(
RenderBox child) → void -
Copied from SliverMultiBoxAdaptorElement.didAdoptChild.
An assertion was removed to accept the dummy child element.
override
-
didChangeDependencies(
) → void -
Called when a dependency of this element changes. [...]
override
-
didFinishLayout(
) → void -
Copied from SliverMultiBoxAdaptorElement.didFinishLayout.
override
-
didStartLayout(
) → void -
Copied from SliverMultiBoxAdaptorElement.didStartLayout.
override
-
estimateMaxScrollOffset(
SliverConstraints constraints, {int firstIndex, int lastIndex, double leadingScrollOffset, double trailingScrollOffset}) → double -
Copied from SliverMultiBoxAdaptorElement.estimateMaxScrollOffset.
The AnimatedSliverChildBuilderDelegate.estimateMaxScrollOffset method call has been removed just now.
override
-
findAncestorRenderObjectOfType<
T extends RenderObject> () → T -
Returns the RenderObject object of the nearest ancestor RenderObjectWidget widget
that is an instance of the given type
T
. [...]inherited -
findAncestorStateOfType<
T extends State< (StatefulWidget> >) → T -
Returns the State object of the nearest ancestor StatefulWidget widget
that is an instance of the given type
T
. [...]inherited -
findAncestorWidgetOfExactType<
T extends Widget> () → T -
Returns the nearest ancestor widget of the given type
T
, which must be the type of a concrete Widget subclass. [...]inherited -
findRenderObject(
) → RenderObject -
The current RenderObject for the widget. If the widget is a
RenderObjectWidget, this is the render object that the widget created
for itself. Otherwise, it is the render object of the first descendant
RenderObjectWidget. [...]
inherited
-
findRootAncestorStateOfType<
T extends State< (StatefulWidget> >) → T -
Returns the State object of the furthest ancestor StatefulWidget widget
that is an instance of the given type
T
. [...]inherited -
forgetChild(
Element child) → void -
Copied from SliverMultiBoxAdaptorElement.forgetChild.
override
-
getElementForInheritedWidgetOfExactType<
T extends InheritedWidget> () → InheritedElement -
Obtains the element corresponding to the nearest widget of the given type
T
, which must be the type of a concrete InheritedWidget subclass. [...]inherited -
inflateWidget(
Widget newWidget, dynamic newSlot) → Element -
Create an element for the given widget and add it as a child of this
element in the given slot. [...]
@protected, inherited
-
inheritFromElement(
InheritedElement ancestor, {Object aspect}) → InheritedWidget -
Registers this build context with
ancestor
such that whenancestor
's widget changes this build context is rebuilt. [...]@Deprecated('Use dependOnInheritedElement instead. ' 'This feature was deprecated after v1.12.1.'), inherited -
inheritFromWidgetOfExactType(
Type targetType, {Object aspect}) → InheritedWidget -
Obtains the nearest widget of the given type, which must be the type of a
concrete InheritedWidget subclass, and registers this build context with
that widget such that when that widget changes (or a new widget of that
type is introduced, or the widget goes away), this build context is
rebuilt so that it can obtain new values from that widget. [...]
@Deprecated('Use dependOnInheritedWidgetOfExactType instead. ' 'This feature was deprecated after v1.12.1.'), inherited
-
insertChildRenderObject(
covariant RenderObject child, covariant dynamic slot) → void -
Insert the given child into renderObject at the given slot. [...]
@Deprecated('Override insertRenderObjectChild instead. ' 'This feature was deprecated after v1.21.0-9.0.pre.'), @mustCallSuper, @protected, inherited
-
insertRenderObjectChild(
covariant RenderObject child, covariant int slot) → void -
Copied from SliverMultiBoxAdaptorElement.insertRenderObjectChild.
This method has been changed in order to accept a null slot, in case of
dummy child element.
override
-
markNeedsBuild(
) → void -
Marks the element as dirty and adds it to the global list of widgets to
rebuild in the next frame. [...]
inherited
-
mount(
Element parent, dynamic newSlot) → void -
This method has been overridden in order to handle the new AnimatedRenderSliverList.didChangeDependencies
method like in State.didChangeDependencies. In addition the method attaches this instance
to the AnimatedListController.
override
-
moveChildRenderObject(
covariant RenderObject child, covariant dynamic slot) → void -
Move the given child to the given slot. [...]
@Deprecated('Override moveRenderObjectChild instead. ' 'This feature was deprecated after v1.21.0-9.0.pre.'), @mustCallSuper, @protected, inherited
-
moveRenderObjectChild(
covariant RenderObject child, covariant int oldSlot, covariant int newSlot) → void -
Copied from SliverMultiBoxAdaptorElement.moveRenderObjectChild.
This method has been changed to avoid calling the AnimatedRenderSliverList method
when reorganizing rendered elements.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
performRebuild(
) → void -
Copied and adapted from SliverMultiBoxAdaptorElement.performRebuild.
In addition: [...]
override
-
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload. [...]
@mustCallSuper, @protected, inherited
-
rebuild(
) → void -
Called by the BuildOwner when BuildOwner.scheduleBuildFor has been
called to mark this element dirty, by mount when the element is first
built, and by update when the widget has changed.
inherited
-
removeChild(
RenderBox child) → void -
Copied from SliverMultiBoxAdaptorElement.removeChild.
override
-
removeChildRenderObject(
covariant RenderObject child) → void -
Remove the given child from renderObject. [...]
@Deprecated('Override removeRenderObjectChild instead. ' 'This feature was deprecated after v1.21.0-9.0.pre.'), @mustCallSuper, @protected, inherited
-
removeRenderObjectChild(
covariant RenderObject child, covariant int slot) → void -
Copied from SliverMultiBoxAdaptorElement.removeRenderObjectChild.
This method has been changed to remove the dummy child element correctly.
override
-
rootAncestorStateOfType(
TypeMatcher matcher) → State< StatefulWidget> -
Returns the State object of the furthest ancestor StatefulWidget widget
that matches the given TypeMatcher. [...]
@Deprecated('Use findRootAncestorStateOfType instead. ' 'This feature was deprecated after v1.12.1.'), inherited
-
setDidUnderflow(
bool value) → void -
Copied from SliverMultiBoxAdaptorElement.debugAssertChildListLocked.
override
-
toDiagnosticsNode(
{String name, DiagnosticsTreeStyle style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep. [...]
inherited
-
toString(
{DiagnosticLevel minLevel: DiagnosticLevel.info}) → String -
Returns a string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants. [...]
inherited
-
toStringShallow(
{String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object. [...]
inherited
-
toStringShort(
) → String -
A short, textual description of this element.
inherited
-
unmount(
) → void -
This method has been overridden in order to detach this instance from the AnimatedListController and
to dispose the render object AnimatedRenderSliverList.
override
-
update(
covariant AnimatedSliverList newWidget) → void -
Copied and adapted from SliverMultiBoxAdaptorElement.update.
override
-
updateChild(
Element child, Widget newWidget, dynamic newSlot) → Element -
Copied from SliverMultiBoxAdaptorElement.updateChild.
override
-
updateChildren(
List< Element> oldChildren, List<Widget> newWidgets, {Set<Element> forgottenChildren}) → List<Element> -
Updates the children of this element to use new widgets. [...]
@protected, inherited
-
updateSlotForChild(
Element child, dynamic newSlot) → void -
Change the slot that the given child occupies in its parent. [...]
@protected, inherited
-
visitAncestorElements(
bool visitor(Element element)) → void -
Walks the ancestor chain, starting with the parent of this build context's
widget, invoking the argument for each ancestor. The callback is given a
reference to the ancestor widget's corresponding Element object. The
walk stops when it reaches the root widget 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 -
Copied from SliverMultiBoxAdaptorElement.visitChildren.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
@nonVirtual, inherited