How to prevent the back button on a page from appearing if that page is reached through the nav bar?

Actions & Logic

How to prevent the back button on a page from appearing if that page is reached through the nav bar?

If the user just logged in and taped on the page icon in the nav bar, he will reach the page which has a back button, but that button won't navigate back anywhere in that case since there is simply no 'back'. To an end user (and to me before figuring out) it seems like a dysfunction.

Even worse, if the user went to a few pages before going to the said page from the nav bar, it navigates back to a totally irrelevant page that was viewed before.

I would like to keep the back button to 'navigate back' except when the page is reached from the nav bar.

The page is 'profile' if that's relevant at all. I have seen that implemented in at least one app.

I wonder if there is a condition in which I can say where the click is coming from to place before the navigate back action (or an implementation of that effect)

Thanks!

What have you tried so far?

I tried looking for a condition that states or emulates 'if the page is reached through .......' but couldn't find any.

If there is one, I could then use it to make the navigate back action conditional or just plug it in conditional visibility.

Did you check FlutterFlow's Documentation for this topic?
Yes
6 replies