forward method
backward will move the scrollbar with a distance of one item in
the bottom direction.
If value of align is true
, the last visible item will be aligned.
Implementation
void forward({bool align = true, bool? animate}) {
if (align) {
final lastIdx = ((offset + inside) / scrollPerItem - 1).floor() + 1;
if (lastIdx >= itemCount) {
return;
}
scrollToItem(lastIdx, animate: animate);
} else {
_scrollToPos(offset + scrollPerItem, animate: animate);
}
}