crow_flutter

Flutter SDK for Crow — add an AI chat assistant to your Flutter app in minutes.

Features

  • Drop-in chat UI — fully styled CrowChatView widget with message bubbles, input bar, suggested actions, and conversation history
  • Headless client — use CrowClient directly if you want to build your own UI
  • Streaming responses — real-time token-by-token streaming via SSE
  • Conversation history — persistent sessions stored locally with shared_preferences
  • Theming — customize colors, fonts, and styles via CrowTheme

Installation

dependencies:
  crow_flutter: ^0.1.0

Quick start

Wrap your app with CrowScope and drop in CrowChatView:

import 'package:crow_flutter/crow_flutter.dart';
import 'package:flutter/material.dart';

void main() => runApp(
  const CrowScope(
    productId: 'your_product_id',
    apiUrl: 'https://your-crow-api.com',
    child: MyApp(),
  ),
);

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(body: CrowChatView()),
    );
  }
}

Theming

CrowChatView(
  theme: CrowTheme(
    backgroundColor: Colors.white,
    userBubbleColor: Colors.black,
    assistantBubbleColor: const Color(0xFFF3F4F6),
    inputBorderColor: const Color(0xFFE5E7EB),
  ),
)

Headless usage

final client = CrowScope.clientOf(context);
final notifier = CrowScope.chatOf(context);

notifier.sendMessage('Hello!');

notifier.addListener(() {
  final state = notifier.state;
  print(state.messages);
});

Platform support

Platform Support
iOS ✅
Android ✅
macOS ✅
Web ✅

License

MIT

Libraries

crow_flutter