crow_flutter 0.1.1
crow_flutter: ^0.1.1 copied to clipboard
Flutter SDK for Crow AI agents — drop-in chat UI and headless client
example/lib/main.dart
import 'package:crow_flutter/crow_flutter.dart';
import 'package:flutter/material.dart';
void main() => runApp(
const CrowScope(
productId: 'YOUR_PRODUCT_ID',
child: MyApp(),
),
);
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Crow Widget Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const HomeScreen(),
);
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('My App')),
body: Stack(
children: [
// Your existing app content
ListView.builder(
padding: const EdgeInsets.all(16),
itemCount: 10,
itemBuilder: (context, i) => Card(
margin: const EdgeInsets.only(bottom: 12),
child: ListTile(
title: Text('Item ${i + 1}'),
subtitle: const Text('Tap the chat button to ask about this'),
),
),
),
// Crow floating chat widget
const CrowWidget(),
],
),
);
}
}