A delegate that supplies children for slivers.

Many slivers lazily construct their box children to avoid creating more children than are visible through the Viewport. Rather than receiving their children as an explicit List, they receive their children using a SliverChildDelegate.

It's uncommon to subclass SliverChildDelegate. Instead, consider using one of the existing subclasses that provide adaptors to builder callbacks or explicit child lists.

See also:

Implemented by

Constructors

SliverChildDelegate()
Abstract const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.
const

Properties

estimatedChildCount int
Returns an estimate of the number of children this delegate will build. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

build(BuildContext context, int index) Widget
Returns the child with the given index. [...]
debugFillDescription(List<String> description) → void
Add additional information to the given description for use by toString.
@mustCallSuper, @protected
didFinishLayout(int firstIndex, int lastIndex) → void
Called at the end of layout to indicate that layout is now complete. [...]
estimateMaxScrollOffset(int firstIndex, int lastIndex, double leadingScrollOffset, double trailingScrollOffset) double
Returns an estimate of the max scroll extent for all the children. [...]
shouldRebuild(SliverChildDelegate oldDelegate) bool
Called whenever a new instance of the child delegate class is provided to the sliver. [...]
toString() String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(other) bool
The equality operator. [...]
inherited