FLUTTER ECOSYSTEM

generic_bloc_provider

A generic BloC Provider for your Flutter apps. This package will help you avoid the boilerplate of writing BloC Providers.

Latest version
2.1.1
30-day downloads
1.7K
Likes
22
Pub points
160

Package Overview

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

Overview

A Flutter package that simplifies state management by providing a generic BloC Provider, reducing boilerplate code typically required when setting up and managing BloC instances. It enables developers to easily inject and access BloC classes across the widget tree with type safety and minimal setup. Ideal for apps using the BloC pattern, it streamlines dependency injection and enhances code maintainability.

Use cases
  • Simplifying BloC instantiation in large apps
  • Reducing repetitive provider boilerplate
  • Managing multiple BloC instances efficiently
  • Enabling type-safe access to BloCs
  • Supporting clean separation of concerns
Key features
  • Generic type support for BloC classes
  • Minimal boilerplate code
  • Type-safe provider access
  • Easy integration with existing BloC patterns
  • Automatic lifecycle management
Suitable for
  • Developers using the BloC pattern
  • Projects aiming to reduce repetitive code
  • Apps with multiple state managers
  • Teams prioritizing maintainable state logic
  • Flutter projects on multiple platforms
Considerations
  • Requires understanding of BloC pattern
  • Not suitable for simple state needs
  • May increase complexity for small apps
  • Best used with other state management tools
  • Limited customization compared to manual providers
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add generic_bloc_provider

Categories

Source repository

Related projects