FLUTTER ECOSYSTEM

bloc_presentation

Dispatch single-time side effects (navigation / snackbar / dialog) from Bloc or Cubit without polluting state.

Latest version
1.1.2+3
30-day downloads
50.5K
Likes
92
Pub points
160

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

The bloc_presentation package enables clean handling of one-time side effects—such as navigation, showing snackbars, or displaying dialogs—from Bloc or Cubit without cluttering the state. It separates presentation logic from state management by allowing events to trigger side effects directly, improving code clarity and testability. Designed for use with Flutter's Bloc/Cubit patterns, it ensures that UI-side actions are dispatched cleanly and efficiently across platforms.

Use cases
  • Handling navigation after state changes
  • Showing temporary feedback like snackbars
  • Displaying dialogs based on business logic
  • Managing one-time UI effects in complex flows
  • Simplifying testable presentation layers
Key features
  • Clean separation of side effects from state
  • Support for single-time event dispatching
  • Integration with Bloc and Cubit
  • Cross-platform compatibility
  • Minimal boilerplate
  • Type-safe side effect handling
Suitable for
  • Flutter apps using Bloc/Cubit
  • Developers seeking cleaner UI logic
  • Teams prioritizing testable presentation layers
  • Projects requiring predictable side effects
  • Apps with frequent navigation or feedback needs
Considerations
  • Requires understanding of Bloc/Cubit patterns
  • Not suitable for recurring side effects
  • May require additional setup in UI layer
  • Best used alongside other presentation-focused packages
  • Limited to side effect management, not state logic
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add bloc_presentation

Categories

Source repository

Related projects