SliverMultiBoxAdaptorElement class Null safety

An element that lazily builds children for a SliverMultiBoxAdaptorWidget.

Implements RenderSliverBoxChildManager, which lets this element manage the children of subclasses of RenderSliverMultiBoxAdaptor.

Inheritance
Implemented types

Constructors

SliverMultiBoxAdaptorElement(SliverMultiBoxAdaptorWidget widget, {bool replaceMovedChildren = false})
Creates an element that lazily builds children for the given widget.

Properties

childCount int
Called to obtain a precise measure of the total number of children.
read-onlyoverride
debugDoingBuild bool
Whether the widget is currently updating the widget or render tree.
read-onlyinherited
debugIsActive bool
Returns true if the Element is active.
read-onlyinherited
debugIsDefunct bool
Returns true if the Element is defunct.
read-onlyinherited
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-onlyinherited
dirty bool
Returns true if the element has been marked as needing rebuilding.
read-onlyinherited
estimatedChildCount int?
The best available estimate of childCount, or null if no estimate is available.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
owner BuildOwner?
The object that manages the lifecycle of this element.
read-onlyinherited
renderObject RenderSliverMultiBoxAdaptor
The underlying RenderObject for this element.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
size Size?
The size of the RenderBox returned by findRenderObject.
read-onlyinherited
slot Object?
Information set by parent to define where this child fits in its parent's child list.
read-onlyinherited
widget Widget
The configuration for this element.
read-onlyinherited

Methods

activate() → void
Transition from the "inactive" to the "active" lifecycle state.
mustCallSuper">@mustCallSuperinherited
attachNotificationTree() → void
Called in Element.mount and Element.activate to register this element in the notification tree.
protected">@protectedinherited
attachRenderObject(Object? newSlot) → void
Add renderObject to the render tree at the location specified by newSlot.
inherited
createChild(int index, {required RenderBox? after}) → void
Called during layout when a new child is needed. The child should be inserted into the child list in the appropriate position, after the after child (at the start of the list if after is null). Its index and scroll offsets will automatically be set appropriately.
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">@protectedinherited
debugAssertChildListLocked() bool
In debug mode, asserts that this manager is not expecting any modifications to the RenderSliverMultiBoxAdaptor's child list.
override
debugDeactivated() → void
Called, in debug mode, after children have been deactivated (see deactivate).
mustCallSuper">@mustCallSuperinherited
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
Calls the argument for each child considered onstage.
override
dependOnInheritedElement(InheritedElement ancestor, {Object? aspect}) InheritedWidget
Registers this build context with ancestor such that when ancestor'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 the Element associated with 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
Called during RenderSliverMultiBoxAdaptor.adoptChild or RenderSliverMultiBoxAdaptor.move.
override
didChangeDependencies() → void
Called when a dependency of this element changes.
mustCallSuper">@mustCallSuperinherited
didFinishLayout() → void
Called at the end of layout to indicate that layout is now complete.
override
didStartLayout() → void
Called at the beginning of layout to indicate that layout is about to occur.
override
dispatchNotification(Notification notification) → void
Start bubbling this notification at the given build context.
inherited
doesDependOnInheritedElement(InheritedElement ancestor) bool
Returns true if dependOnInheritedElement was previously called with ancestor.
protected">@protectedinherited
estimateMaxScrollOffset(SliverConstraints? constraints, {int? firstIndex, int? lastIndex, double? leadingScrollOffset, double? trailingScrollOffset}) double
Called to estimate the total scrollable extents of this object.
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
Remove the given child from the element's child list, in preparation for the child being reused elsewhere in the element tree.
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, Object? newSlot) Element
Create an element for the given widget and add it as a child of this element in the given slot.
protected">@protectedinherited
insertRenderObjectChild(covariant RenderObject child, covariant int slot) → void
Insert the given child into renderObject at the given slot.
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, Object? newSlot) → void
Add this element to the tree in the given slot of the given parent.
inherited
moveRenderObjectChild(covariant RenderObject child, covariant int oldSlot, covariant int newSlot) → void
Move the given child from the given old slot to the given new slot.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
performRebuild() → void
Cause the widget to update itself.
override
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
mustCallSuper">@mustCallSuperprotected">@protectedinherited
rebuild() → void
Cause the widget to update itself. In debug builds, also verify various invariants.
inherited
removeChild(RenderBox child) → void
Remove the given child from the child list.
override
removeRenderObjectChild(covariant RenderObject child, covariant int slot) → void
Remove the given child from renderObject.
override
setDidUnderflow(bool value) → void
Called during layout to indicate whether this object provided insufficient children for the RenderSliverMultiBoxAdaptor to fill the SliverConstraints.remainingPaintExtent.
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
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
Transition from the "inactive" to the "defunct" lifecycle state.
inherited
update(covariant SliverMultiBoxAdaptorWidget newWidget) → void
Change the widget used to configure this element.
override
updateChild(Element? child, Widget? newWidget, Object? newSlot) Element?
Update the given child with the given new configuration.
override
updateChildren(List<Element> oldChildren, List<Widget> newWidgets, {Set<Element>? forgottenChildren, List<Object?>? slots}) List<Element>
Updates the children of this element to use new widgets.
protected">@protectedinherited
updateSlotForChild(Element child, Object? newSlot) → void
Change the slot that the given child occupies in its parent.
protected">@protectedinherited
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
Calls the argument for each child. Must be overridden by subclasses that support having children.
override

Operators

operator ==(Object other) bool
Compare two widgets for equality.
nonVirtual">@nonVirtualinherited