goTo method
Animates the SectionSwitcher to the section at the given newIndex.
The animation is controlled by the SectionSwitcher's duration and curve
properties. If the newIndex is the same as the current index, this
Implementation
// does nothing.
void goTo(int newIndex) {
if (_index != newIndex) {
_index = newIndex;
notifyListeners();
}
}