Skip to main content

ai_chat_composer 0.1.0 copy "ai_chat_composer: ^0.1.0" to clipboard
ai_chat_composer: ^0.1.0 copied to clipboard

A polished, accessible and backend-neutral multimodal prompt composer for Flutter AI applications.

ai_chat_composer #

A polished, backend-neutral prompt composer for Flutter AI applications. It provides the interaction layer while your app controls file picking, speech recognition, models, and networking.

Features #

  • Responsive multiline prompt input
  • Attachment chips with removal callbacks
  • Optional model selector and voice-input hook
  • Send and stop-generation states
  • Cmd+Enter and Ctrl+Enter submission shortcuts
  • External or internally managed text and focus controllers
  • Material 3 styling and semantic labels

Installation #

dependencies:
  ai_chat_composer: ^0.1.0

Quick start #

AiChatComposer(
  models: const [
    AiModelOption(id: 'fast', label: 'Fast'),
    AiModelOption(id: 'smart', label: 'Smart'),
  ],
  selectedModel: selectedModel,
  onModelChanged: (value) => setState(() => selectedModel = value),
  attachments: attachments,
  onAddAttachment: pickAttachment,
  onRemoveAttachment: removeAttachment,
  onVoiceInput: startSpeechRecognition,
  onSend: (prompt) => sendToBackend(prompt),
)

When a response is being generated, set isGenerating: true and provide onStop. The callback receives an AiPrompt containing trimmed text, an immutable attachment list, and the selected model ID.

Design philosophy #

This package intentionally does not request device permissions or choose file, speech, or AI providers. Apps retain control over privacy-sensitive integrations while sharing a consistent composer UI.

License #

MIT © 2026 Syed Waleed Nawaz

1
likes
150
points
412
downloads

Documentation

API reference

Publisher

verified publishersyedwaleednawaz.com

Weekly Downloads

A polished, accessible and backend-neutral multimodal prompt composer for Flutter AI applications.

Homepage
Repository (GitHub)
View/report issues

Topics

#ai #widget #chat #accessibility

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ai_chat_composer