Skip to content

StreamProvider with Riverpod Generator

🎉 Streams are now supported in Riverpod Generator 2.0.0! Here’s how to get started:

  • Declare a method that returns a Stream
  • Annotate it with @riverpod
  • Run build_runner to generate all the providers

But there’s more. 🧵


With the Riverpod Lint package, we can convert any provider from a functional to a class variant, and vice-versa. 🎉

This means we can do things like this: 👇


If you want to learn more about the Riverpod Generator package, check my (updated) article:

Previous Next
Fix missing ProviderScope error with Riverpod Lint Cloud Firestore - Cache Size

Last update: 18 septembre 2023
Created: 18 septembre 2023