flutter-state-review

Enforce Bloc/Cubit-driven Flutter UI and delegate data access to repositories.

2|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/abdullahbokl/Boklo-Wallet --skill flutter-state-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-state-review
Source: https://github.com/abdullahbokl/Boklo-Wallet/tree/main/.agent/skills/flutter-state-review
Command: npx skills add https://github.com/abdullahbokl/Boklo-Wallet --skill flutter-state-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flutter UI often contains business logic or direct Firebase calls, which makes code hard to test and maintain. This skill defines guardrails to ensure UI widgets only render state from Blocs/Cubits and delegate all data access to Repositories.

Core Features & Use Cases

  • Ban Logic in UI: Widgets must not perform business logic or call Firebase/Firestore directly; they should rely on Bloc/Cubit for state and trigger events.
  • Review Bloc Dependencies: Blocs should depend on Repositories, not data sources; the Data layer handles fetching and subscriptions.
  • Stream Safety & One-Way Data Flow: Ensure streams are managed, yield via states, and rebuilds occur from Bloc output only.

Quick Start

Review all UI code paths to remove direct data calls and replace them with Bloc-driven events and states; ensure repositories handle data access.

Frequently Asked Questions about flutter-state-review

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

FAQPage Schema
How do I remove direct Firebase calls from Flutter UI widgets?

To remove direct Firebase calls from Flutter UI, enforce Bloc-driven state management where widgets only render states and trigger events, delegating all data access to repositories. This ensures UI contains no business logic or direct Firestore calls.

Why should my Flutter Bloc depend on repositories instead of data sources?

Flutter Blocs should depend on repositories to separate state management from data fetching. Repositories handle data sources and subscriptions, keeping Blocs focused on yielding states and ensuring a clean one-way data flow.

How do I ensure stream safety and one-way data flow in Flutter Cubit?

Ensure stream safety in Flutter Cubit by correctly managing streams and yielding updates via states. Rebuilds must occur strictly from Bloc or Cubit output, preventing unmanaged stream leaks and maintaining predictable state updates.

Does this state management approach work for refactoring spaghetti Flutter widgets?

Yes, this approach works for refactoring spaghetti Flutter widgets by enforcing Bloc and Cubit guardrails. It reviews UI code paths to remove embedded business logic and replaces direct data calls with Bloc-driven events and repository access.

What is the best way to debug state update issues in Flutter Bloc?

The best way to debug Flutter Bloc state update issues is to verify that UI strictly uses Bloc events to update state. Ensure data access is performed by repositories and that stream yields correctly trigger UI rebuilds from Bloc output.