1. Section intro


In this section we'll continue to work with the Riverpod package and implementing the authentication flows in the app (sign out, sign in with email & password).


  • Implement an authentication repository, which will use a reactive in-memory database to store information about the authenticated user (using RxDart)
  • Learn to create your own controller classes based on StateNotifier
  • Use controllers to manage the widget state and communicate with the repositories in the data layer
  • Listening to state changes inside the widgets
  • Difference between ref.watchref.read and ref.listen using Riverpod
  • Catching errors with try/catch vs AsyncValue.guard
  • Creating immutable state classes with final properties
  • Generation of copyWithtoString==hashCode using the Dart Data Class Generator extension
  • Email & password sign in with a custom controller and state class
  • Using select() to partially listen to a provider
  • How to implement a redirect and refresh listenable with GoRouter & Riverpod

By the end of this section, you'll be familiar with all the most useful Riverpod APIs.

Complete and Continue