Presentation events - a missing piece in BLoC
summary
BLoC lacks a built‑in way to model one‑time UI events, so add a lightweight mixin that exposes a non-buffered stream for ephemeral signals and an emitPresentation method alongside regular emit. Implementation uses existing Cubit/BLoC APIs and a symmetric listener API, moves transient errors out of persistent state, and lets snackbars or toasts fire repeatedly even when identical. A small package and demo app prove it works and keeps state updates separate from presentation events.
AI-written summary · about
chapters (6)
- 0:00Presentation events intro
- 1:09BLoC structure & limits
- 3:12Transient events problem
- 7:43Solution: presentation events mixin
- 9:31Live demo
- 16:59Conclusion & Q&A
related talks
22mFlutter State Smackdown: Comparing BLoC, Provider, Riverpod
30mEphemeral UIs That Learn, Adapt, and Vanish
46mHow to Cook Flutter Correctly
49mReactive Architecture for Flutter
58mFlutter from idea to app in 45min
01h 12mLive-Coding With Simon (Part II) - Simon Lightfoot & Kevin Moore
37mFlutter Development
46mHow to Cook Flutter Properly
