State Management con BLoC Avanzado

Manage Flutter application state with BLoC, Cubit, Hydrated BLoC, and Replay BLoC.

1|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/vertivolatam/monorepo --skill state-management-con-bloc-avanzado
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: State Management con BLoC Avanzado
Source: https://github.com/vertivolatam/monorepo/tree/main/skills/flutter/bloc-advanced
Command: npx skills add https://github.com/vertivolatam/monorepo --skill state-management-con-bloc-avanzado

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires flutter_bloc, bloc, hydrated_bloc, replay_bloc, equatable, freezed_annotation, json_annotation, get_it, injectable, path_provider, build_runner, freezed, json_serializable, injectable_generator, bloc_test, mocktail, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the complexity of managing application state in Flutter by providing a structured and scalable approach using the BLoC (Business Logic Component) pattern, enabling robust separation of concerns and enhanced testability.

Core Features & Use Cases

  • Advanced State Management: Implements BLoC and Cubit for complex UI state, event handling, and business logic.
  • State Persistence: Integrates Hydrated BLoC for automatic saving and restoring of application state.
  • Debugging Tools: Leverages Replay BLoC for state history, undo/redo functionality, and detailed event logging.
  • Testing: Provides comprehensive examples and setup for unit and integration testing of BLoC components.
  • Use Case: Develop a feature-rich e-commerce app where user authentication state, product listings, cart contents, and order history are managed efficiently and persist across app sessions.

Quick Start

Generate a Flutter application structure with advanced BLoC state management, including authentication and product features.

Frequently Asked Questions about State Management con BLoC Avanzado

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement advanced state management in Flutter using BLoC and Cubit?

Advanced state management in Flutter using BLoC and Cubit is implemented by structuring domain, data, and presentation layers to handle complex UI state, events, and business logic. This approach ensures robust separation of concerns and enhanced testability.

What is the best way to persist Flutter BLoC state across app sessions?

To persist Flutter BLoC state across app sessions, integrate Hydrated BLoC for automatic saving and restoring of application state. This allows user data like cart contents and authentication to remain intact across restarts.

How does Replay BLoC work for debugging Flutter state history?

Replay BLoC works for debugging Flutter state history by providing detailed event logging, maintaining state history, and enabling undo and redo functionality. This allows developers to trace and revert state changes efficiently during development.

Can I use freezed and equatable together for Flutter BLoC state classes?

Yes, you can use freezed and equatable together for Flutter BLoC state classes. They are integrated as dependencies alongside build_runner and json_serializable to handle data class generation, equality comparisons, and JSON serialization.

How do I set up unit testing for Flutter BLoC components with mocktail?

Unit testing for Flutter BLoC components with mocktail is set up by utilizing the bloc_test package to verify state transitions and mocktail to mock dependencies. Comprehensive examples are provided to validate business logic and event handling.

Does this BLoC state management approach support dependency injection with get_it and injectable?

Yes, this BLoC state management approach supports dependency injection with get_it and injectable. These dependencies are integrated to manage and inject services across the domain, data, and presentation layers effectively.