Unable to Set Custom Transition Duration While Maintaining iOS Swipe Back Gesture
snackva opened this issue · comments
I am using AutoRoute in my Flutter project and encountering an issue when trying to set a custom transition duration for routes. I would like to maintain the default iOS swipe back gesture while having a custom transition duration.
Problem:
When I use CustomRoute
to set the transition duration, the swipe back gesture on iOS is lost:
CustomRoute(
page: ProfileRoute.page,
path: "/profile/:userId",
guards: [AuthGuard()],
durationInMilliseconds: 500,
transitionsBuilder: TransitionsBuilders.slideLeft
)
On the other hand, using AutoRoute
maintains the swipe back gesture but does not allow me to set a custom transition duration:
AutoRoute(
page: ProfileRoute.page,
path: "/profile/:userId",
guards: [AuthGuard()]
)
Request:
Is there a way to achieve both a custom transition duration and maintain the iOS swipe back gesture? Any guidance or suggestions on how to resolve this issue would be greatly appreciated.
Additional Information:
- Flutter version: 3.19.6
- AutoRoute version: 8.1.3
- AutoRoute generator version: 8.0.0
Thank you for your help!
Hey @snackva unfortunately this is not a bug, this is an intended behaviour, it doesn't make sense to swipe-back on a page that transitions from bottom up or from top down for example.
Thanks @Milad-Akarie but the desired behavior is to have the same transition animation and swipe back gesture in iOS while changing the transition duration. Isn't there a way to archieve that?
Any update? @Milad-Akarie