scrollLevelUp method
void
scrollLevelUp()
Implementation
void scrollLevelUp() {
if (_scrollController == null) return;
double itemHeight = widget.itemHeight;
double nextPosition = _scrollController!.offset - itemHeight;
double roundToNextItemPosition =
(nextPosition / itemHeight).round() * itemHeight;
_scrollController!.animateTo(
roundToNextItemPosition,
duration: const Duration(milliseconds: 200),
curve: Curves.fastOutSlowIn,
);
}