animateTo method

void animateTo (int value, { Duration duration: kTabScrollDuration, Curve curve: Curves.ease })

Immediately sets index and previousIndex and then plays the animation from its current value to index.

While the animation is running indexIsChanging is true. When the animation completes offset will be 0.0.

Implementation

void animateTo(int value, { Duration duration = kTabScrollDuration, Curve curve = Curves.ease }) {
  _changeIndex(value, duration: duration, curve: curve);
}