ephemeral_bloc 0.1.0 copy "ephemeral_bloc: ^0.1.0" to clipboard
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.onAction now receives the action directly; EphemeralBlocChange was removed.
  • Constrain action types to non-nullable Object values.
  • Mark emitAction as 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 any BlocBase, separate from state.
  • EphemeralBlocListener — listens to one-shot actions, compatible with MultiBlocListener.
  • EphemeralBlocConsumer — combines EphemeralBlocListener, an optional BlocListener, and BlocBuilder in one widget.
  • EphemeralBlocObserver — mixin for BlocObserver to observe actions emitted across all BLoCs.
  • EphemeralBlocChange — snapshot of an action transition (previous/current).
1
likes
160
points
88
downloads

Documentation

API reference

Publisher

verified publisherntfnd404.dev

Weekly Downloads

Fire-and-forget one-shot action stream for flutter_bloc, for UI side-effects that must not live in state.

Repository (GitHub)
View/report issues

Topics

#bloc #flutter-bloc #side-effects #actions #one-shot-events

License

MIT (license)

Dependencies

flutter, flutter_bloc, nested

More

Packages that depend on ephemeral_bloc