Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Flutter
  3. Bloc

Bloc

MITDartbloc_lint-v0.4.2

A predictable state management library for Dart and Flutter that implements the BLoC design pattern.

Visit WebsiteGitHubGitHub
12.5k stars3.4k forks0 contributors

What is Bloc?

Bloc is a state management library for Dart and Flutter that helps implement the BLoC (Business Logic Component) design pattern. It provides a predictable way to manage application state by separating business logic from presentation, making it easier to test, debug, and maintain complex applications. The library includes core packages for Flutter, AngularDart, and pure Dart, along with tools for testing, persistence, and concurrency control.

Target Audience

Flutter and Dart developers building medium to large-scale applications who need a structured, testable approach to state management. It's particularly useful for teams working on cross-platform projects where business logic needs to be shared between mobile and web.

Value Proposition

Developers choose Bloc for its strong separation of concerns, excellent testability, and predictable state transitions. Its rich ecosystem of supporting packages and extensive documentation make it a robust choice for production applications, while its platform-agnostic core allows logic reuse across Flutter, AngularDart, and pure Dart projects.

Overview

A predictable state management library that helps implement the BLoC design pattern

Use Cases

Best For

  • Building complex Flutter applications with clear separation between UI and business logic
  • Sharing business logic code between Flutter mobile apps and AngularDart web applications
  • Implementing test-driven development with isolated, easily testable state management
  • Creating applications that require predictable state transitions and traceable data flow
  • Developing large-scale applications where maintainability and scalability are critical
  • Building applications that need platform-agnostic business logic components

Not Ideal For

  • Rapid prototyping or MVP development where minimal boilerplate and fast iteration are prioritized
  • Projects with simple, localized state that doesn't benefit from the full BLoC pattern's separation of concerns
  • Teams already committed to alternative state management libraries like Riverpod or Provider without a clear migration path
  • Applications requiring tight integration with non-Dart ecosystems, as Bloc is Dart-specific

Pros & Cons

Pros

Predictable State Management

Enforces unidirectional data flow with explicit state transitions, making debugging easier and state changes traceable, as highlighted in the architecture diagram and key features.

Clear Architecture Separation

Cleanly divides business logic from presentation, improving code organization and maintainability, which is core to the BLoC design pattern philosophy.

Excellent Testability

Isolates business logic in Blocs, allowing easy unit testing without UI dependencies, supported by the dedicated bloc_test package and examples.

Cross-Platform Reusability

Blocs can be shared across Flutter, AngularDart, and pure Dart projects, promoting code reuse and consistent logic, as shown in the multi-platform examples.

Comprehensive Ecosystem

Includes a rich set of packages for concurrency control, persistence, linting, and testing, providing a full toolkit for production applications.

Cons

Boilerplate Intensive

Requires defining multiple classes for events, states, and handlers, leading to verbose code even for simple state changes, which can slow development.

Dart Ecosystem Lock-in

Tightly coupled to Dart and Flutter, making it unsuitable for projects that may need to migrate to other languages or frameworks outside this ecosystem.

Steeper Learning Curve

Demands understanding of streams, the BLoC pattern, and associated packages, which can be challenging for developers new to reactive programming.

Frequently Asked Questions

Quick Stats

Stars12,476
Forks3,419
Contributors0
Open Issues59
Last commit2 days ago
CreatedSince 2018

Tags

#dart#library#testability#reactive-programming#bloc-pattern#mobile-development#web-development#flutter#flutter-package#bloc#state-management#dart-library#dartlang

Built With

D
Dart

Links & Resources

Website

Included in

Flutter59.5k
Auto-fetched 7 hours ago

Related Projects

GetXGetX

Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.

Stars11,191
Forks1,851
Last commit1 month ago
RiverPodRiverPod

A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.

Stars7,339
Forks1,101
Last commit2 days ago
ProviderProvider

InheritedWidgets, but simple

Stars5,259
Forks525
Last commit4 months ago
MobXMobX

MobX for the Dart language. Hassle-free, reactive state-management for your Dart and Flutter apps.

Stars2,467
Forks318
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub