You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Let's say we have a list of items. Clicking on an item will navigate to the details of this item. Normally to handle that we will have on the state of our flow with a property Item? so if the item is null we know we should be on the list page, else we should be on the details page.
The problem comes if you try to navigate back from details to the list page again. Typically we can handle that just overriding the back button or using will pop scope.
Problem with will pop scope: it will not work with the native back button on Android and swipe navigation on iOS.
Problem with the back button: we will have to handle the view of this navigation inside the details page itself. So if we have a big flow we might suffer more than expected.
Describe the solution you'd like
I would like to have a new API that informs whether the user pops a page.
Then we have 2 choices for updating the state:
I will need also maybe the page that is popping and I will manually check what I need to do, in this case clear the item of the state.
Have a similar approach to the ReplayBloc with the undo.
I think number 1 should be easier to develop in the flow builder package, but developers will need to handle these cases anyway. Number 2 seems more complicated but developers will not need to do anything.
Additional context
This is an issue If you are using external state management, in my case, bloc.
The text was updated successfully, but these errors were encountered:
However, I do believe FlowBuilder should expose a better API for detecting back navigation. One of the possible APIs could be adding an onChangedPages to FlowBuilder. I would expect onChangedPages to be called whenever the stack of pages changes.
Is your feature request related to a problem? Please describe.
Let's say we have a list of items. Clicking on an item will navigate to the details of this item. Normally to handle that we will have on the state of our flow with a property
Item?
so if the item is null we know we should be on the list page, else we should be on the details page.The problem comes if you try to navigate back from details to the list page again. Typically we can handle that just overriding the back button or using will pop scope.
Problem with will pop scope: it will not work with the native back button on Android and swipe navigation on iOS.
Problem with the back button: we will have to handle the view of this navigation inside the details page itself. So if we have a big flow we might suffer more than expected.
Describe the solution you'd like
I would like to have a new API that informs whether the user pops a page.
Then we have 2 choices for updating the state:
I think number 1 should be easier to develop in the flow builder package, but developers will need to handle these cases anyway. Number 2 seems more complicated but developers will not need to do anything.
Additional context
This is an issue If you are using external state management, in my case, bloc.
The text was updated successfully, but these errors were encountered: