sidekick icon indicating copy to clipboard operation
sidekick copied to clipboard

Navigation (Refactor/Clean up)

Open leoafarias opened this issue 3 years ago • 5 comments

Sidekicks navigation is extremely simple, and it currently relies on Riverpod for its navigation. This is something we should refactor and clean up as the features navigation will continue to be more complex, and we want to link to nested pieces within the app.

I haven't checked a lot of the progress made on Navigation after Navigator 2.0, but I heard things about its complexity. Here are some packages worth considering.

  • Riverpod Navigation - extremely new and hot off the presses, but might be something that fits well with what we currently do.
  • Fluro - Which I think is one of the more mature abstractions.
  • Auto Route - Has an interesting approach to it, even though our navigation is very simple maybe it's overkill (we don't have guarded routing for example)
  • Plain Navigator 2.0 - Maybe our navigation is simple enough where this is might be a good approach. I don't have any experience with it to know.

Any other suggestions are welcome!

leoafarias avatar Jun 18 '21 14:06 leoafarias

Hi @leoafarias, maybe another suggestion to check out:

MattisBrizard avatar Jun 20 '21 06:06 MattisBrizard

@leoafarias what do you think about "flow" idea? https://flutter.dev/docs/cookbook/effects/nested-nav

You could use Riverpod or something else to keep state, if needed.

Also have a package called Flow Builder, which use Navigation 2.0 and the possibility to use different states.

robsonsilv4 avatar Jun 23 '21 17:06 robsonsilv4

@robsonsilv4 I took a look at Flow builder, but it seems very tied to the application state, in an opinionated way. Wanted something a bit more light weight hopefully.

leoafarias avatar Jun 23 '21 17:06 leoafarias

There was a solution by the velocityX Package: https://www.youtube.com/watch?v=-2K-mRWJvwE

It's easy to use, but not really lightweight

Ahmadre avatar Aug 09 '21 10:08 Ahmadre

Thinking about going with go_router as the feedback has been great so far from the community. https://pub.dev/packages/go_router

leoafarias avatar Nov 29 '21 21:11 leoafarias