ephemeral_bloc 0.1.0
ephemeral_bloc: ^0.1.0 copied to clipboard
Fire-and-forget one-shot action stream for flutter_bloc, for UI side-effects that must not live in state.
0.1.0 #
- Breaking: action callbacks now receive
(context, action)without a state snapshot. - Breaking:
EphemeralBlocObserver.onActionnow receives the action directly;EphemeralBlocChangewas removed. - Constrain action types to non-nullable
Objectvalues. - Mark
emitActionas protected and safely ignore emissions after closing starts. - Capture the action observer when the BLoC or Cubit is created.
- Correct action-stream shutdown and provider-replacement lifecycle behavior.
- Add complete API documentation, runnable example, release checks, and expanded lifecycle/widget tests.
0.0.1 #
- Initial release.
EphemeralBlocMixin— adds a fire-and-forget one-shot action stream to anyBlocBase, separate from state.EphemeralBlocListener— listens to one-shot actions, compatible withMultiBlocListener.EphemeralBlocConsumer— combinesEphemeralBlocListener, an optionalBlocListener, andBlocBuilderin one widget.EphemeralBlocObserver— mixin forBlocObserverto observe actions emitted across all BLoCs.EphemeralBlocChange— snapshot of an action transition (previous/current).