/go_router_riverpod

An example on how to use Riverpod + GoRouter

Primary LanguageDart

Go Router + Riverpod Examples

This repo contains a plethora of examples on how to integrate GoRouter and Riverpod altogether.

These examples are community driven and strive to represent the "best" solution we've found. Every example in here is a simple mock of a login.

Special Thanks

BIG THANKS to...

  • @[anyone] who has ever contributed in here
  • @[the whole riverpod discord community] for the discussions we've enjoyed around this problem
  • @rrousselGit for creating this great ecosystem!

Which example should I read or use?

I do realize there are a lot of examples on this repo.

After putting a lot of thought, here's a quick guide to help you choose.

  1. Check the complete_example folder for a full example containing the latest versions of riverpod and go router.
  2. Check the code_gen for the same example as complete_example, but with the usage of riverpod_annotation, freezed and go_router_builder.
  3. Check the firebase_example for a basic firebase integration with the two libraries.
  4. Check the legacy folder for older, and possibly simpler examples. These examples are "old", but could still be useful. Some are to be discarded entirely, though (WIP).

Something feels off....

Please consider starring this mini-repo if you found it useful.

If you didn't, or if you want to contribute in any way, a discussion about improving this example can be found here.