A IndexedStack with switching animation

Usage

The usage is just like the normal IndexedStack.

int _currentIndex = 0;
SlideIndexedStack(
  axis: Axis.horizontal,
  slideOffset: 0.5,
  index: _currentIndex,
  duration: const Duration(milliseconds: 300),
  children: [
    _buildPage(0),
    _buildPage(1),
    _buildPage(2),
    _buildPage(3),
    _buildPage(4)
  ],
)