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

ModalSheetPage with DraggableNavigationSheetPage/ScrollableNavigationSheetPage Pop animation #272

Open
Clon1998 opened this issue Oct 20, 2024 · 1 comment

Comments

@Clon1998
Copy link

Clon1998 commented Oct 20, 2024

I have implemented bottom sheet navigation similar to the one used in the AI Playlist Generator. I have a ShellRoute that returns a ModalSheetPage within the ShellRoute.pageBuilder method. The routes in the Shell are either DraggableNavigationSheetPage or ScrollableNavigationSheetPage.

The navigation works well, and I can have nicely animated transitions when opening Sheet-A and then pushing Sheet-B. Popping Sheet-B also transitions smoothly back. However, if I add a close button on Sheet-A to pop Sheet-A, both the transition animation and the ModalSheetPage animation play, resulting in a strange closing animation.

On the other hand, if I tap the barrier, only the animation of the ModalSheetPage plays, and Sheet-A remains visible.

Is there a way to ensure that the transition animation is not used when popping the last sheet in a ShellRoute so that only the "slide-down" animation of the modal sheet is used?

Here is an example of recoding. Due to the platform, it uses the "Slide" transition, which looks weird when closing the sheet:

ScreenRecording_10-20-2024.21-37-03_1.MP4
@Clon1998
Copy link
Author

As I am using GoRouter with Shell routes I realized there I can just use GoRouter.of rather than Navigator.of which just shows the modal close animation

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

1 participant