Skip to content

Latest commit

History

History
36 lines (20 loc) 路 1.04 KB

File metadata and controls

36 lines (20 loc) 路 1.04 KB

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:


Found this useful? Show some love and share the original tweet 馃檹


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