flutter_gen_ai_chat_ui 2.13.0 copy "flutter_gen_ai_chat_ui: ^2.13.0" to clipboard
flutter_gen_ai_chat_ui: ^2.13.0 copied to clipboard

AI chat UI for Flutter. Streaming text, markdown, LaTeX, rich inline widgets, function-calling/agent surface, RTL, theming. ChatGPT/Claude/Gemini ready.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'home_screen.dart';
import 'examples/basic_chat.dart';
import 'examples/streaming_chat.dart';
import 'examples/themed_chat.dart';
import 'examples/actions_chat.dart';
import 'examples/rich_widgets_chat.dart';
import 'examples/rtl_chat.dart';

void main() {
  runApp(const ExampleApp());
}

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

  @override
  State<ExampleApp> createState() => _ExampleAppState();
}

class _ExampleAppState extends State<ExampleApp> {
  ThemeMode _themeMode = ThemeMode.light;

  void _toggleTheme() {
    setState(() {
      _themeMode =
          _themeMode == ThemeMode.dark ? ThemeMode.light : ThemeMode.dark;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Gen AI Chat UI',
      debugShowCheckedModeBanner: false,
      themeMode: _themeMode,
      theme: ThemeData(
        colorSchemeSeed: const Color(0xFF6366F1),
        useMaterial3: true,
        brightness: Brightness.light,
      ),
      darkTheme: ThemeData(
        colorSchemeSeed: const Color(0xFF6366F1),
        useMaterial3: true,
        brightness: Brightness.dark,
      ),
      home: HomeScreen(onToggleTheme: _toggleTheme),
      routes: {
        '/basic': (_) => const BasicChatExample(),
        '/streaming': (_) => const StreamingChatExample(),
        '/themed': (_) => const ThemedChatExample(),
        '/actions': (_) => const ActionsChatExample(),
        '/rich-widgets': (_) => const RichWidgetsChatExample(),
        '/rtl': (_) => const RtlChatExample(),
      },
    );
  }
}
93
likes
140
points
2.18k
downloads

Documentation

Documentation
API reference

Publisher

verified publisherdilacode.com

Weekly Downloads

AI chat UI for Flutter. Streaming text, markdown, LaTeX, rich inline widgets, function-calling/agent surface, RTL, theming. ChatGPT/Claude/Gemini ready.

Repository (GitHub)
View/report issues

Topics

#ai #chat #llm #streaming #markdown

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

flutter, flutter_markdown_plus, flutter_math_fork, flutter_streaming_text_markdown, google_fonts, shimmer, url_launcher

More

Packages that depend on flutter_gen_ai_chat_ui