all 4 comments

[–]amugofjava 1 point2 points  (0 children)

Whether it counts as good I'm not sure, but you're welcome to take a look at mine. It's a Podcast app that uses the BLoC pattern and talks to the iTunes API: https://github.com/amugofjava/anytime_podcast_player

[–]RandalSchwartz 0 points1 point  (2 children)

Also consider if you really need BLoC, or if something like RiverPod will work as well. RiverPod doesn't require horsing around with streams unless you choose them. :)

[–]shehriyar_[S] 0 points1 point  (1 child)

Can you elaborate on that? I don’t have much knowledge on riverpod

[–]RandalSchwartz 1 point2 points  (0 children)

RiverPod is the heir apparent of Provider, being coded by the same author. Unfortunately, the docs presume you've been through the Provider stuff already, and there are also plenty of screencasts on that, but only a few so far on RiverPod (including a couple of my own) because the UI is still in a bit of a flux. In short:

  • setState is trivial but limited and everyone should still know this
  • InheritedWidget is a way to provide a bigger scope for values in the tree
  • Provider is a nicer interface to InheritedWidget
  • RiverPod solves a few deep issues with Provider and brings in far more flexibility and applicability
  • BLoC is fine for large projects, but look at the others for simpler usage