wf-flutter-create-controller-method

Create Flutter feature controllers with StreamValue exposure and GetIt DI wiring.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/belluga/delphi-ai --skill wf-flutter-create-controller-method
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wf-flutter-create-controller-method
Source: https://github.com/belluga/delphi-ai/tree/main/skills/wf-flutter-create-controller-method
Command: npx skills add https://github.com/belluga/delphi-ai --skill wf-flutter-create-controller-method

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Introduce and maintain a dedicated controller for Flutter features that owns UI state, encapsulates side effects, and exposes data through StreamValue, ensuring widgets remain pure and presentation logic is centralized and testable.

Core Features & Use Cases

  • Owns UI state, asynchronous actions, and StreamValue streams for a screen or feature.
  • Encapsulates side effects and business rules, exposing a stable API to widgets and routes.
  • Supports DI wiring via GetIt and proper lifecycle management (dispose) to maintain resource hygiene.

Quick Start

Scaffold a new Flutter feature controller using the provided workflow scaffold and wire it into GetIt for DI.

Frequently Asked Questions about wf-flutter-create-controller-method

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

FAQPage Schema
How do I separate business logic from UI in Flutter using a controller?

To separate business logic from UI in Flutter, use a dedicated controller to own UI state, encapsulate side effects, and expose data streams. This ensures widgets remain pure and presentation logic is centralized and testable.

How do I manage controller lifecycle and dispose resources in Flutter?

To manage controller lifecycle and dispose resources in Flutter, implement the Disposable pattern. This maintains resource hygiene by properly cleaning up side effects and stream subscriptions when the controller is no longer in use.

Do I need GetIt to wire a Flutter controller for dependency injection?

Yes, you can use GetIt to wire a Flutter controller for dependency injection. The controller supports DI wiring via GetIt, allowing you to scaffold a new feature controller and register it for proper dependency management.

What is the best way to expose asynchronous data flows to Flutter widgets?

The best way to expose asynchronous data flows to Flutter widgets is through StreamValue exposure. By encapsulating side effects within a controller, you provide a stable API and stream data to widgets without coupling UI logic to data sources.

Why does my Flutter state management break across screen boundaries?

Flutter state management breaks across screen boundaries when presentation logic lacks a testable contract. Using a dedicated controller ensures stable API exposure and proper state ownership, maintaining data flow consistency across routes.

Can I use a dedicated controller for complex UI logic in Flutter?

Yes, you can use a dedicated controller for complex UI logic in Flutter. It applies to features requiring asynchronous data flows, side effect encapsulation, and testable presentation-layer contracts across screen boundaries.