Is your feature request related to a problem? Please describe.
Currently, the only way to show a back button on the first page of the FlowBuilder is to manually add it to the app bar as described here. In that case, WillPopScope included on the same page will not trigger after using either the app bar or Android back button. Similarly, neither didPop nor didRemove will be triggered when using a navigator observer passed to the FlowBuilder. This means that there is no easy way to observe and prevent popping the first page of the FlowBuilder.
An example could be an onboarding page (as the first page of the FlowBuilder) where the Android back button should swipe back to the previous onboarding screen (but not pop the page). The problem does not occur if the onboarding page is the second page of the FlowBuilder with an app bar that uses a default back button - in that case WillPopScope can prevent the navigation back.
Describe the solution you'd like
It would be nice to have a similar structure as WillPopScope. I am not sure though about this solution, it could result in an incorrect navigation stack when onPopPage returns false after the flow being updated.
Is your feature request related to a problem? Please describe.
Currently, the only way to show a back button on the first page of the
FlowBuilder
is to manually add it to the app bar as described here. In that case,WillPopScope
included on the same page will not trigger after using either the app bar or Android back button. Similarly, neitherdidPop
nordidRemove
will be triggered when using a navigator observer passed to theFlowBuilder
. This means that there is no easy way to observe and prevent popping the first page of theFlowBuilder
.An example could be an onboarding page (as the first page of the
FlowBuilder
) where the Android back button should swipe back to the previous onboarding screen (but not pop the page). The problem does not occur if the onboarding page is the second page of theFlowBuilder
with an app bar that uses a default back button - in that caseWillPopScope
can prevent the navigation back.Describe the solution you'd like It would be nice to have a similar structure as
WillPopScope
. I am not sure though about this solution, it could result in an incorrect navigation stack whenonPopPage
returnsfalse
after the flow being updated.Describe alternatives you've considered
WillPopScope
Additional context None