Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Set Custom Transition Duration While Maintaining iOS Swipe Back Gesture #1971

Open
snackva opened this issue Jun 5, 2024 · 3 comments

Comments

@snackva
Copy link

snackva commented Jun 5, 2024

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!

@Milad-Akarie
Copy link
Owner

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.

@snackva
Copy link
Author

snackva commented Jun 14, 2024

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?

@snackva
Copy link
Author

snackva commented Jun 27, 2024

Any update? @Milad-Akarie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants