How to Detect if the user leaves the current page ?

Actions & Logic

Hello,
I have a form page, and I want to ask the user to save their progress as a draft if they try to leave the page without completing the form.

By “leave the page,” I mean when they:

  • Click the back button

  • Navigate to another page

  • Switch tabs in the navigation bar

What have you tried so far?

I tested the "On Dispose" action, but it seems like it doesn't work.

Did you check FlutterFlow's Documentation for this topic?
No
2
1 reply