setResourceIndex method

void setResourceIndex(
  1. int index
)

Sets the index of the selected resource.

If tabController is null, it sets _index to index. Otherwise, it animates to the index tab.

Implementation

void setResourceIndex(int index) {
  if (tabController == null) {
    _index = index;
  } else {
    tabController!.animateTo(index);
  }
}