onestudio-co / flutter-bond

Your next Flutter project template!
178 stars 49 forks source link

Migrate From Auto route package to go router #130

Closed salahamassi closed 1 year ago

salahamassi commented 1 year ago

Reasons to Consider Migrating to go_router:

There's no definitive answer to whether you should migrate from auto_route to go_router as both packages serve the primary purpose of simplifying navigation in Flutter apps. However, here are some reasons why developers might consider switching:

Reasons to Consider Migrating to go_router:

  1. Simplified API: we find go_router's API to be more straightforward than auto_route, good by code generation.

  2. Hooks & Middleware: go_router supports middleware, allowing you to perform actions like logging or analytics tracking easily for each route change.

  3. Web URL Semantics: If your application is going to be web-based and you require URL navigation that closely follows web semantics, go_router may offer more flexibility.

  4. Guard Redirects: go_router provides a clear method for implementing guards, which can prevent navigation to certain routes based on specific conditions.

  5. Customization: go_router allows for extensive customization of routing behavior, from setting a default route to handling unknown routes and more.

  6. Community and Maintenance: The package is officially backed up by Flutter developers as a part of Flutter packages