Skip to content

Instantly share code, notes, and snippets.


Afonsocraposo/main.dart Secret

Created Aug 11, 2019
What would you like to do?
_setCurrentIndex & _triggerAnimation
_setCurrentIndex(int index) {
// if we're actually changing the index
if (index != _currentIndex) {
setState(() {
// change the index
_currentIndex = index;
// trigger the button animation
// scroll the TabBar to the correct position (if we have a scrollable bar)
_triggerAnimation() {
// reset the animations so they're ready to go
// run the animations!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment