scrollToIndex method
Scrolls to a specific index in the item list.
Implementation
Future<bool> scrollToIndex(
int index, {
Duration duration = const Duration(milliseconds: 250),
Curve curve = Curves.linearToEaseOut,
double alignment = 0,
double offset = 0,
}) {
if (_scrollToIndex == null) {
return Future.value(false);
}
return (_scrollToIndex as PaginationScrollToIndex)(
index,
duration: duration,
curve: curve,
alignment: alignment,
offset: offset,
);
}