flutter-ai-integration
Flutter AI Integration
Integrate model behavior as an unreliable, asynchronous external capability with an explicit product contract. Preserve the project's provider, backend, networking client, state management, persistence, and UI architecture unless the user requests a migration.
Installing or loading this skill never requires an OpenAI or other provider API key. Do not add a provider SDK, account setup, credential, or backend merely because this skill was selected.
Preflight
Read pubspec.yaml, SDK constraints, existing AI or API adapters, backend boundary, authentication, model configuration, state ownership, persistence, privacy requirements, tests, and platform targets. Clarify the intended capability and failure behavior before choosing a model, provider, SDK, or UI toolkit.
Keep model and provider details behind a narrow application-owned interface. Treat output, tool arguments, citations, and structured data as untrusted input. Define cancellation, timeout, retry, partial-result, quota, offline, and unsupported-capability behavior.
Load references conditionally
- Read service boundary and secrets when selecting client versus backend responsibilities, credentials, provider abstraction, safety, privacy, or model configuration.
- Read streaming, tools, and state when implementing streamed output, conversations, attachments, structured responses, or tool/function calls.
- Read Flutter AI Toolkit and GenUI only when the project uses or is considering those Flutter packages. Do not introduce them by default.