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

Allow pages to stop from navigating away, e.g. if there are unsaved state changes #6

Open
ghost opened this issue Nov 7, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 7, 2021

Hello,
I am going to start a web project with Flutter, for another project use the Fluro library, however, I could not solve the following problem:
If a user is on a page that contains a form and is making modifications is said form, I would like that if he tries to exit without having saved the modifications (either by putting another url, with the browser's backbutton, ...) it would show him an alertdialog giving him the possibility of canceling the navigation to the new url or, on the contrary, of canceling the modifications and staying on the same page where he is.
The question is, can I do this with seafarer?
seafarer has any mechanism by which this functionality can be achieved?
Please, if this functionality is possible with seafarer could you give me some indications.
Thank you so much for all the help.
Regards,
Jose

@zhanbst
Copy link
Collaborator

zhanbst commented Dec 27, 2021

@Josua2012, you can use WillPop/WillPopScope. But not tested on web platform. Cause we need implements passing arguments via link

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