Closed WilliamMrc closed 1 month ago
I can see from other part of the controller that this behavior is intentional.
another solution is to add a previous()
function that explicitly navigate to previous route in wizard.
Is it a better solution ?
@WilliamMrc I guess back means more like pop:ing, than going to the route before the current one. A previous method could work!
@spydon thanks for the feed back. please tell me if my PR #433 is ok for you.
Steps to reproduce :
jump('route3')
=> 'route3' is loadedback()
=> 'route1' is loaded and not 'route2'code exploration :
back function search for previous route in routes. If the previous route is not found in state,
state.lastIndexWhere((settings) => settings.name == previous)
returns -1 and the route at index 0 of state is loaded.Solution proposition :
if route is not in state, call
_loadRoute
and place it before current route in state.I can try to resolve it with a PR if you think it's a good solution.