I have to use IndexedStack to maintain the state of my widgets for my BottomNavigationBar. Now i want to use AnimatedSwitcher (or an alternative) to create an animation when
This is a cleaner way to use IndexedStack with animations , I created a FadeIndexedStack widget.
https://gist.github.com/diegoveloper/1cd23e79a31d0c18a67424f0cbdfd7ad
Usage
body: FadeIndexedStack(
//this is optional
//duration: Duration(seconds: 1),
children: _tabs.map((t) => t.widget).toList(),
index: _currentIndex,
),