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

WoltModalSheet.of(context).showPrevious, but show actually previously shown sheet #366

Open
kkoskenvirta opened this issue Feb 12, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@kkoskenvirta
Copy link

What feature would you like to see?

I would like to have control of navigating back to the previously shown sheet and not only the previous indexed sheet. If the state would keep track of the last page shown, this could be implemented with showPageWithId(). Now the state doesn't seem to have any history data.

@kkoskenvirta kkoskenvirta added the enhancement New feature or request label Feb 12, 2025
@ulusoyca
Copy link
Collaborator

Now the state doesn't seem to have any history data.

@kkoskenvirta The state management can be done in a StateHolder class provided with modalDecorator. When you have the state in the state holder (or state provider) class, and go back to the previous page, it should work.

https://pub.dev/packages/wolt_modal_sheet#why-use-modaldecorator-for-state-management

@kkoskenvirta
Copy link
Author

Yea, I took that route currently to hold the history state on my own state that wraps all the sheets with modalDecorator, however I think it would be natural for WoltModalSheetState to hold its own navigation state/history by default rather than having to implement it on my own for every separate set of sheets. However I understand if it happens to be against the architectural idea of this package 👍

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

No branches or pull requests

2 participants