animateToKey method

void animateToKey(
  1. K key, {
  2. Duration duration = kTabScrollDuration,
  3. Curve curve = Curves.ease,
})

Keyed equivalent to TabController.animateTo.

Implementation

void animateToKey(
  K key, {
  Duration duration = kTabScrollDuration,
  Curve curve = Curves.ease,
}) {
  _indexedController.animateTo(
    max(_keys.indexOf(key), 0),
    duration: kTabScrollDuration,
    curve: curve,
  );
}