Animation types when switching tabs
Hi, thanks for continuing this package. Is there a way to use different screen transition animation? (ex: Fade/Zoom) Currently it's sliding left/right when tapping on the tabs.
No sorry, currently it is not possible.
Update: there is a way to change the transition if you dont rely on stateManagement: https://github.com/jb3rndt/PersistentBottomNavBarV2/issues/38
@jb3rndt I'm wondering if you have come up with any solution or implementation that makes the other transitions possible without losing the state as of today. our app relies on stateManagement and we need to have fade transition between pages for both iOS and Android
Hi, yes! You can find animatedTabBuilder in version 5.0.0-beta.5. Here is an example on how to use this callback for a translation transition (which is the default):
final double yOffset = newIndex > index
? -animationValue
: (newIndex < index
? animationValue
: (index < oldIndex ? animationValue - 1 : 1 - animationValue));
return FractionalTranslation(
translation: Offset(yOffset, 0),
child: child,
);
It should work with a fade too.