morpheus
morpheus copied to clipboard
not able to go back on swipe
I'm using it with auto_route to generate routes
here is the function I created to use with auto_route package:
Widget morpheusTransition(BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) { final transitionSettings = MorpheusRouteArguments( // parentKey: parentKey, scrimColor: Colors.black45, borderRadius: BorderRadius.circular(20), transitionColor: context.theme.bottomAppBarColor, transitionToChild: true, scaleChild: true, ); return MorpheusPageTransition(context: context, animation: animation, secondaryAnimation: secondaryAnimation, child: child, settings: transitionSettings); }
And this is how I'm using it:
@CustomAutoRouter(transitionsBuilder: morpheusTransition) class $Router { @initial StartUpView startUpViewRoute; LoginView loginViewRoute; ..... }