FLUTTER ECOSYSTEM

flutter_bloc_pattern

Bloc provider. Provides bloc to descendant widget (O(1)), and the bloc is disposed appropriately by state which the bloc_provider holds internally.

Latest version
3.0.0
30-day downloads
5.7K
Likes
4
Pub points
160

Package Overview

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

Overview

A lightweight Flutter package that provides a Bloc to descendant widgets efficiently with O(1) access. It manages the lifecycle of the Bloc automatically, disposing it when the owning state is disposed. Designed for seamless integration within Flutter apps using the BLoC pattern, it simplifies state management by ensuring proper resource cleanup and easy access across widget trees.

Use cases
  • Managing app state in complex UIs
  • Sharing data between nested widgets
  • Implementing reactive UIs with BLoC
  • Automating Bloc disposal on widget removal
  • Simplifying state flow in large-scale apps
Key features
  • O(1) Bloc access for performance
  • Automatic Bloc disposal
  • Built-in state lifecycle management
  • Simple API for integration
  • Cross-platform support
Suitable for
  • Developers using the BLoC pattern
  • Apps requiring efficient state sharing
  • Teams prioritizing clean resource management
  • Large Flutter applications with complex state logic
  • Projects aiming for predictable state handling
Considerations
  • Requires understanding of BLoC pattern
  • Limited to use with stateful widgets that hold the provider
  • Not suitable for simple one-off state needs
  • Depends on internal state management
  • May introduce overhead in very small apps
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add flutter_bloc_pattern

Categories

Related projects