flutter_agentic_ui 0.1.1 copy "flutter_agentic_ui: ^0.1.1" to clipboard
flutter_agentic_ui: ^0.1.1 copied to clipboard

Drop-in chat UI for Flutter AI agents — chat view, streaming bubbles, ReAct step visualizer, and typing indicator, wired to flutter_agentic.

example/main.dart

// Example: a complete AI chat screen in one file.
import 'package:flutter/material.dart';
import 'package:flutter_agentic/flutter_agentic.dart';
import 'package:flutter_agentic_ui/flutter_agentic_ui.dart';

void main() => runApp(const DemoApp());

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

  @override
  Widget build(BuildContext context) => MaterialApp(
    theme: ThemeData(colorSchemeSeed: Colors.indigo, useMaterial3: true),
    home: const ChatScreen(),
  );
}

class ChatScreen extends StatefulWidget {
  const ChatScreen({super.key});

  @override
  State<ChatScreen> createState() => _ChatScreenState();
}

class _ChatScreenState extends State<ChatScreen> {
  late final AgenticChatController controller = AgenticChatController(
    agent: GenesisAgent(
      provider: GeminiProvider(apiKey: 'YOUR_GEMINI_API_KEY'),
      systemPrompt: 'You are a friendly assistant.',
      tools: GenesisTools.all, // calculator, date/time, http, weather
    ),
  );

  @override
  void dispose() {
    controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Agent Chat'),
        actions: [
          IconButton(
            icon: const Icon(Icons.delete_outline),
            onPressed: controller.clear,
          ),
        ],
      ),
      body: AgenticChatView(
        controller: controller,
        // streamResponses: true, // token-by-token mode
      ),
    );
  }
}
1
likes
160
points
189
downloads

Documentation

API reference

Publisher

verified publisherinlayad.com

Weekly Downloads

Drop-in chat UI for Flutter AI agents — chat view, streaming bubbles, ReAct step visualizer, and typing indicator, wired to flutter_agentic.

Repository (GitHub)
View/report issues

Topics

#flutter #ai #chat #ui #agent

License

MIT (license)

Dependencies

flutter, flutter_agentic

More

Packages that depend on flutter_agentic_ui