void scrollToIndex(int index, int duration, bool animate) { scrollToOffset(calculateOffsetOfIndex(index), duration, animate); }