previous method

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

Animates to the previous tab.

Implementation

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