Skip to content

Flutter chat widgets (AIChatView / AIChatController) #11

Description

@Amayyas

Why

Turn the package from an API client into a real Flutter SDK: drop-in chat UI.

Estimated effort: 3-5 days. The biggest chantier on the roadmap — involves a structuring decision.

Recommended decision

Ship a separate package flutter_ai_sdk_ui (same repo as a workspace/monorepo, or a distinct repo) so people who only want the API client don't pull in a material dependency. The main package currently has zero material import — keep it that way.

Minimal viable content

  • AIChatController (a ChangeNotifier wrapping FlutterAI: messages, isGenerating state, errors, abort).
  • AIChatView: message ListView + input field + token-by-token streaming display (listen to streamChat, rebuild per chunk), typing indicator, error handling with retry.
  • Themable MessageBubble (via a ThemeExtension), basic markdown support (evaluate markdown_widget vs flutter_markdown).
  • A full example in example/.

Infra if a separate package

  • Its own pubspec.yaml, CI (matrix job), pub.dev publishing — reuse the
    tag → OIDC workflow with a tag pattern like ui-v{{version}} and its own
    pub.dev admin configuration.

Definition of done

  • Decide: separate package vs. same package under a new export
  • AIChatController + AIChatView + themable message bubble
  • Streaming rendering, error/retry handling
  • Full example app
  • If separate package: CI + publish workflow mirroring the main package

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestroadmapPlanned future work

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions