Riverpod + Firebase Tutorial.mp4
Github Repo
GitHub - fireship-io/riverpod-firebase-demo: Example of Riverpod with FlutterFire
Riverpod is a reactive state-management library for Flutter that can simplify the way global data is shared throughout your application. It is especially useful with Firebase because it allows to you easily join Streams together, like a Firestore document with a Firebase Auth user.
The following tutorial demonstrates how to use Riverpod to manage Firebase Auth state and relational realtime data in Firestore.
Learning Objectives
This tutorial assumes you have already installed Firebase into your app. Install Riverpod by adding it to the pubspec.yaml
file.
The application should initialize Firebase and look something like this:
pubspec.yaml
firebase_core: "^1.10.0"
cloud_firestore: "^3.1.0"
firebase_auth: "^3.2.0"
flutter_riverpod: ^1.0.0
The main function should initialize Firebase and the root widget should be wrapped in a ProviderScope
.