scrollTo method
Scrolls to the element at index
. The element will be placed under the
group header.
To set a custom alignment
set automaticAlignment
to false.
See ItemScrollController.scrollTo
Implementation
@override
Future<void> scrollTo({
required int index,
required Duration duration,
double alignment = 0,
bool automaticAlignment = true,
Curve curve = Curves.linear,
List<double> opacityAnimationWeights = const [40, 20, 40],
}) {
if (automaticAlignment) {
alignment = _stickyGroupedListViewState!.headerDimension ?? alignment;
}
return super.scrollTo(
index: index * 2 + 1,
alignment: alignment,
duration: duration,
curve: curve,
opacityAnimationWeights: opacityAnimationWeights,
);
}