smoothScrollToIndex method
void
smoothScrollToIndex(})
scroll to item index
. index
can be outside of items
values. So it
can animate multiple rotations of the wheel. Animation parameters curve
and
Implementation
// ///[duration] can be provided.
void smoothScrollToIndex(int index,
{Curve curve = Curves.easeIn,
Duration duration = const Duration(milliseconds: 150)}) {
scrollController.animateTo(
_getOffsetForSelection(index),
curve: curve,
duration: duration,
);
}