LogoSkills

inspector/bloc

BLoC/Cubit state runtime tracking

항ëĒŠë‚´ėšŠ
Categorypetmedi-development
Complexitysimple
MCP Serversflutter-inspector

/inspector/bloc#

Context Framework Note: Activated when debugging BLoC state management.

Triggers#

  • State change tracking
  • BLoC event debugging
  • State inconsistency issues

MCP Tools#

bloc_list_active#

Returns a list of currently active BLoC/Cubit instances.

Response example:

{
   " blocs " : [
    { " type " :  " AuthBloc " ,  " state " :  " Authenticated " },
    { " type " :  " HomeBloc " ,  " state " :  " Loaded " },
    { " type " :  " CartCubit " ,  " state " :  " Empty " }
  ]
}

bloc_get_state#

Returns the current state of a specific BLoC.

Response example:

{
   " type " :  " HomeBloc " ,
   " state " : {
     " status " :  " loaded " ,
     " items " : 15,
     " selectedCategory " :  " all " 
   }
}

bloc_get_history#

Returns the state change history of a BLoC.

bloc_get_events#

Returns the event history.

Common Diagnostics#

State not updating#

1. bloc_list_active - >   Confirm BLoC exists
2. bloc_get_events - >   Confirm event was fired
3. bloc_get_history - >   Track state changes

Unexpected state#

1. bloc_get_state - >   Check current state
2. bloc_get_history - >   Track change process
3. Review event handler logic

Excessive BLoC rebuilds#

1. bloc_get_events - >   Check event frequency
2. Review buildWhen conditions
3. Check state comparison logic

Examples#

Check active BLoC list#

/inspector/bloc list

Check specific BLoC state#

/inspector/bloc state HomeBloc

Check event history#

/inspector/bloc events AuthBloc

References#

  • Detailed implementation: .claude/agents/flutter-inspector-bloc.md
  • Master inspector: .claude/commands/inspector.md