Giter Club home page Giter Club logo

go_router_riverpod's Introduction

GoRouter + Riverpod integration

This repo contains a simple example on how to integrate GoRouter and Riverpod altogether. There's also another example about GoRouter + Riverpod + Firebase integrations.

This example is community driven and strives to represent the "best" solution we've found.

The example, TLDR

Here's what happens when you run the app:

  • There's a simple mock of a login. Tap to login (mock).
  • The authentication state is persisted with sharedPrefs.
  • Afterwards, your authorization is checked, and you get redirected based on that (mock).
  • Based on your role, you get to see three different pages.
  • On two out of the three pages, an async result is displayed, there (mock).
  • Finally, when the async result is ready, you're free to tap an element to see its details.

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!

Is there something without codegen or / and hooks?

No, not at this moment in time. PRs are welcome, but chances are that I'll maintain the codegen and firebase (based on codegen) examples only.

What about older examples, with legacy versions of the aforementioned libraries?

For the same reason above, I stopped maintaining legacy integrations. It just doesn't makes sense, since there's a potentially unlimited amount of combinations to take care of.

Use git. You'll find a lot of folders full of old examples.

Something feels off....

Please consider starring this mini-repo if you found it useful. Also please consider opening an issue or a PR if you think you can contribute in here. Don't be shy!

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

go_router_riverpod's People

Contributors

lucavenir avatar ponnamkarthik avatar packruble avatar gengiscb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.