next method

void next({
  1. Duration duration = kTabScrollDuration,
  2. Curve curve = Curves.ease,
})

Animates to the next tab.

Implementation

void next({
  Duration duration = kTabScrollDuration,
  Curve curve = Curves.ease,
}) {
  if (_controller.index == _controller.length - 1) return;

  animateTo(_controller.index + 1);
}