convert-cubit

Convert manual Cubit loading and error handling into mix-based flows.

7|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/marcglasberg/bloc_superpowers --skill convert-cubit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convert-cubit
Source: https://github.com/marcglasberg/bloc_superpowers/tree/main/.claude/skills/convert-cubit
Command: npx skills add https://github.com/marcglasberg/bloc_superpowers --skill convert-cubit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convert manual Cubit loading and error handling into mix-based flows to simplify state management and reduce boilerplate.

Core Features & Use Cases

  • Wraps Cubit methods with mix() to eliminate explicit loading/error emissions.
  • Removes isLoading and errorMessage/state fields from state and updates widgets to use context.isWaiting() and context.isFailed().
  • Supports converting multiple methods across a Cubit, with options for per-method keys and consistent error handling via UserException.

Quick Start

Identify a Cubit to convert and wrap targeted methods with mix(), then remove loading/error boilerplate and refactor state and widgets accordingly.

Frequently Asked Questions about convert-cubit

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

FAQPage Schema
How do I remove isLoading and errorMessage from my Cubit state in Flutter?

To remove isLoading and errorMessage from Cubit state, wrap Cubit methods with mix() to eliminate explicit loading and error emissions, then update widgets to use context.isWaiting() and context.isFailed() instead of state fields.

What is the best way to handle loading states in Flutter Cubit without boilerplate?

The best way to handle loading states in Flutter Cubit without boilerplate is converting manual loading emissions to mix-based flows, wrapping methods with mix(key: ...) to automatically track waiting states.

Can I convert multiple Cubit methods to use mix() with different keys?

Yes, you can convert multiple Cubit methods to use mix() with per-method keys, allowing distinct tracking of each method's loading and error states via context.isWaiting() with specific keys.

How does UserException work when converting Cubit error handling to mix()?

UserException provides consistent error handling when converting Cubit error handling to mix(), replacing errorMessage fields so widgets can retrieve failures via context.isFailed() and display user-friendly messages.

What widget updates are required after converting a Cubit to mix()?

Widget updates required after converting a Cubit to mix() involve removing references to state's isLoading and errorMessage fields, replacing them with context.isWaiting() and context.isFailed() checks to reflect loading and error states.