I am new in Flutter, and so I have a list of widgets,

final List<Widget> _backgrounds = [
 const BackgroundDesign(index: 0),
 const BackgroundDesign(index: 1),
 const BackgroundDesign(index: 2),
 const BackgroundDesign(index: 3)
];

this code and navigator:

IndexedStack(children: [
 Center(
  child: _backgrounds.elementAt(_selectedIndex),
 )
],),

It changes _selectedIndex on click, so the result looks like this: box1 box2

So what i am trying to achieve is _backgrounds.elementAt(_selectedIndex) to be changed with fade animation. Is there any solution for this? Thank you.