Search packages, repositories and app categories

Package detailsv0.18.0

flutter_hooks_bloc

A flutter_bloc reimplementation based on flutter_hooks with the same API.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.1K
Likes
35
Pub points
160

Install package

flutter pub add flutter_hooks_bloc

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

flutter_hooks_bloc is a state management solution that reimagines flutter_bloc using Flutter Hooks, offering the same API for developers familiar with flutter_bloc. It leverages the power of hooks to simplify state handling in functional widgets, enabling reactive UIs with minimal boilerplate. Designed for seamless integration, it supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux. This package enhances developer productivity by combining the declarative nature of hooks with the robust state management patterns of bloc.

Use cases

  • Reactive UIs with minimal boilerplate
  • State management in functional widgets
  • Migrating from flutter_bloc to hooks-based architecture
  • Cross-platform app development
  • Simplifying complex state logic
  • Replacing traditional StatefulWidget with functional approaches

Key features

  • Same API as flutter_bloc
  • Built on top of flutter_hooks
  • Minimal boilerplate
  • Cross-platform support
  • Reactive state updates
  • Functional widget compatibility

Suitable for

  • Developers experienced with flutter_bloc
  • Teams adopting hooks-based architecture
  • Projects requiring lightweight state management
  • Functional UI components
  • Apps targeting multiple platforms
  • Those seeking reduced boilerplate in state handling

Considerations

  • Requires familiarity with Flutter Hooks
  • May not suit teams preferring class-based state management
  • Limited documentation compared to flutter_bloc
  • Potential learning curve for new hook users
  • Less mature ecosystem than flutter_bloc
  • Not ideal for very simple state needs

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Bloc Alternatives libraries

A collection of dart & flutter packages to work with Bloc

Packages

flutter_hooks_bloc

A reimplementation of flutter_bloc based on flutter_hooks.

Advantages:

  • Now you can use a useBloc hook function.
  • Bloc widgets has less compostion in te widget tree.
  • Widget inspector gives information about bloc/cubit.
  • It's easy to create a widget with a MultiBlocBuilder behavior.

riverbloc

Expose a BlocProvider based on Riverpod and can be use with flutter_riverpod or hooks_riverpod instead of flutter_bloc.

With this package, MultiBlocProvider is not necessary anymore. No more FlutterError/ProviderNotFoundException on context.bloc() invocation.

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.