AnimatedSliverChildBuilderDelegate class

Class copied from SliverChildBuilderDelegate.

The builder has been changed using a new callback that has a new animating parameter indicating when to build the item in an animating state or not. For example, in animating state you should avoid to use a key because a duplicate key exception will arise.

The childCount attribute has been replaced with a callback function. This callback has to return the actual length of your list that will be changed after every change, insertion, removal and replacement. A null value can be also returned, especially for infinite lists.

Inheritance

Constructors

AnimatedSliverChildBuilderDelegate(AnimatedNullableIndexedWidgetBuilder builder, {ChildIndexGetter findChildIndexCallback, int childCount(): _kChildCount, bool addAutomaticKeepAlives: true, bool addRepaintBoundaries: true, bool addSemanticIndexes: true, SemanticIndexCallback semanticIndexCallback: _kDefaultSemanticIndexCallback, int semanticIndexOffset: 0})
const

Properties

addAutomaticKeepAlives bool
final
addRepaintBoundaries bool
final
addSemanticIndexes bool
final
builder AnimatedNullableIndexedWidgetBuilder
final
childCount int Function()
final
estimatedChildCount int
Copied from SliverChildBuilderDelegate.estimatedChildCount. The new callback AnimatedSliverChildBuilderDelegate.childCount will be called instead of just an attribute.
read-only, override
findChildIndexCallback ChildIndexGetter
final
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
semanticIndexCallback SemanticIndexCallback
final
semanticIndexOffset int
final

Methods

build(BuildContext context, int index) Widget
Copied from SliverChildBuilderDelegate.build. This method has been modified in order to handle the new animating attribute that indicates when an item should be build in an animating way or not. In addition, the new callback AnimatedSliverChildBuilderDelegate.childCount will be called instead of just an attribute.
override
debugFillDescription(List<String> description) → void
Add additional information to the given description for use by toString.
@mustCallSuper, @protected, inherited
didFinishLayout(int firstIndex, int lastIndex) → void
Called at the end of layout to indicate that layout is now complete. [...]
inherited
estimateMaxScrollOffset(int firstIndex, int lastIndex, double leadingScrollOffset, double trailingScrollOffset) double
Method not supported yet. Don't override it!
override
findIndexByKey(Key key) int
Copied from SliverChildBuilderDelegate.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
shouldRebuild(covariant AnimatedSliverChildBuilderDelegate oldDelegate) bool
Copied from SliverChildBuilderDelegate.shouldRebuild.
override
toString() String
Returns a string representation of this object.
inherited

Operators

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