Remove go_router dependency for navigation #1613
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This PR removes our dependency on
go_router
, and migrates our existing usage ofgo_router
with the built in Navigator. There's a few reasons for this refactor:go_router
and Navigator. Since we are only usinggo_router
for the Settings page, it seems a bit redundant to have the package when we could implement the same logic using Navigator. Thus, it makes more sense to use Navigator unless we require a specific feature fromgo_router
(e.g., ShellRoutes)go_router
allows us to simplify state restoration later on (e.g., when the app is killed by the OS to free up memory). Navigator has a simple method of creating restorable states whereasgo_router
is a bit more complex (and may not fully work well in some cases)This is still in draft as there's a bit more testing / refining that is needed:
Issue Being Fixed
This tangentially relates to, and is a first step to hopefully solving #1607. There is still a lot of additional steps that is required, but being able to restore the navigation state is the first step (e.g., to be able to navigate back to the CreatePostPage)
Issue Number: N/A
Screenshots / Recordings
Checklist
semanticLabel
s where applicable for accessibility?