animateTo method
Future
animateTo({
- required int index,
- required Duration duration,
- required Curve curve,
- EdgeInsets padding = EdgeInsets.zero,
- BuildContext? sliverContext,
- bool isFixedHeight = false,
- double alignment = 0,
- ObserverLocateIndexOffsetCallback? offset,
Jump to the specified index position with animation.
If the height of the child widget and the height of the separator are
fixed, please pass the isFixedHeight
parameter.
The alignment
specifies the desired position for the leading edge of the
child widget. It must be a value in the range 0.0, 1.0
.
Implementation
Future animateTo({
required int index,
required Duration duration,
required Curve curve,
EdgeInsets padding = EdgeInsets.zero,
BuildContext? sliverContext,
bool isFixedHeight = false,
double alignment = 0,
ObserverLocateIndexOffsetCallback? offset,
}) {
return innerAnimateTo(
index: index,
duration: duration,
curve: curve,
padding: padding,
sliverContext: sliverContext,
isFixedHeight: isFixedHeight,
alignment: alignment,
offset: offset,
renderSliverType: ObserverRenderSliverType.list,
);
}