Skip to main content

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

Accessible Flutter widgets for streamed AI answers, Markdown, citations, tool-call progress, and response actions.

ai_response_view #

An accessible, backend-neutral Flutter widget for presenting modern AI responses. Render streaming Markdown, citations, tool activity, and common response actions with one composable widget.

Features #

  • Selectable Markdown with styled code blocks
  • Streaming progress and accessible live-region announcements
  • Citation chips with customizable navigation
  • Waiting, running, success, and failure states for tool calls
  • Copy, stop, and retry actions
  • Material 3 styling with a ThemeExtension

Installation #

dependencies:
  ai_response_view: ^0.1.0

Quick start #

AiResponseView(
  content: 'Flutter uses a **reactive widget tree**.',
  citations: [
    AiCitation(
      label: 'Flutter docs',
      uri: Uri.parse('https://docs.flutter.dev'),
    ),
  ],
  toolCalls: const [
    AiToolCall(
      name: 'Search documentation',
      status: AiToolCallStatus.succeeded,
    ),
  ],
  onRetry: regenerate,
)

During generation, update content as chunks arrive, set isStreaming: true, and provide onStop.

Theming #

Add AiResponseTheme to ThemeData.extensions, or let the widget derive Material 3 defaults from the active ColorScheme.

Streaming content is exposed as a semantic live region. Links and citations use url_launcher by default; provide onCitationTap to handle navigation yourself.

License #

MIT © 2026 Syed Waleed Nawaz

1
likes
150
points
413
downloads

Documentation

API reference

Publisher

verified publishersyedwaleednawaz.com

Weekly Downloads

Accessible Flutter widgets for streamed AI answers, Markdown, citations, tool-call progress, and response actions.

Homepage
Repository (GitHub)
View/report issues

Topics

#ai #widget #markdown #chat

License

MIT (license)

Dependencies

flutter, flutter_markdown_plus, url_launcher

More

Packages that depend on ai_response_view