scrollOffItemCenter method

double scrollOffItemCenter(
  1. int index
)

scrollOffItemCenter return the offset when the item is placed at the center of the screen.

Implementation

double scrollOffItemCenter(int index) {
  return (index + 1) * scrollPerItem - inside / 2;
}