2

I've actually built a TabBarView controlled with a tab controller and works correctly. The only issue I'm having is that I can't find a way to change the animation across screens. Instead of the default animation, I want to implement something like a fade transition. This is a code sample of what I've done so far:

return TabBarView(
  physics: NeverScrollableScrollPhysics(), //Avoid manual scrolling
  controller: _tabController,                      
  children: [    
      //don't mind how the various widgets are built. It's note relevant for the issue
      ...widget.screens
         .map((screen) => screen.screen)
         .toList(),                      
  ],
);

//Further in the widget
@override
void initState() {
   super.initState();
   _tabController = TabController(length: widget.screens.length, vsync: this, initialIndex: 0);
}

//THEN DISPOSE IT...
AndreaCostanzo1
  • 1,799
  • 1
  • 12
  • 30
  • Maybe this answer will help: https://stackoverflow.com/questions/52889604/flutter-change-the-animation-of-tabbarview – Dom Jan 17 '23 at 11:01

0 Answers0