The project at https://github.com/DelcoigneYves/duckrouter-example shows issues with our current API. We can not use a StatefulLocation to host a modal sheet in when we want to show a page in the background, but at that point using root() will bring one back all the way outside the modal sheet.
This use case of wanting to stay in the modal in that case is a standard mobile flow, and thus we need to support it. This PR:
Removes our root method. This is thus a breaking change.
We replace root with popUntil(). popUntil accepts a location, and will then pop till it encounters that location. This is a simpler API than the default Flutter popUntil: https://api.flutter.dev/flutter/widgets/Navigator/popUntil.html. This is intentional, I want to keep the API simple here.
Related Issues
11
Closes #7
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
Description
The project at https://github.com/DelcoigneYves/duckrouter-example shows issues with our current API. We can not use a StatefulLocation to host a modal sheet in when we want to show a page in the background, but at that point using
root()
will bring one back all the way outside the modal sheet.This use case of wanting to stay in the modal in that case is a standard mobile flow, and thus we need to support it. This PR:
root
method. This is thus a breaking change.root
withpopUntil()
.popUntil
accepts a location, and will then pop till it encounters that location. This is a simpler API than the default Flutter popUntil: https://api.flutter.dev/flutter/widgets/Navigator/popUntil.html. This is intentional, I want to keep the API simple here.Related Issues
11
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?