ai_chat_plus 1.0.5 copy "ai_chat_plus: ^1.0.5" to clipboard
ai_chat_plus: ^1.0.5 copied to clipboard

A Flutter package that provides AI chat functionality with enhanced features including OpenAI, Google Gemini, and Claude AI integrations, voice recognition, and multimodal support.

example/main.dart

import 'package:flutter/material.dart';
import 'pages/gemini_page.dart';
import 'pages/openai_page.dart';
import 'pages/claude_page.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'AI Chat Plus Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const HomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        decoration: BoxDecoration(
          gradient: LinearGradient(
            begin: Alignment.topLeft,
            end: Alignment.bottomRight,
            colors: [
              Colors.deepPurple.shade100,
              Colors.blue.shade100,
              Colors.teal.shade100,
            ],
          ),
        ),
        child: SafeArea(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              const Text(
                'AI Chat Plus',
                style: TextStyle(
                  fontSize: 32,
                  fontWeight: FontWeight.bold,
                  color: Colors.black87,
                ),
              ),
              const SizedBox(height: 40),
              _buildAIButton(
                context,
                'Chat with Gemini',
                Icons.psychology,
                Colors.deepPurple,
                const GeminiChatPage(),
              ),
              const SizedBox(height: 20),
              _buildAIButton(
                context,
                'Chat with OpenAI',
                Icons.chat_bubble,
                Colors.blue,
                const OpenAIChatPage(),
              ),
              const SizedBox(height: 20),
              _buildAIButton(
                context,
                'Chat with Claude',
                Icons.auto_awesome,
                Colors.teal,
                const ClaudeChatPage(),
              ),
            ],
          ),
        ),
      ),
    );
  }

  Widget _buildAIButton(BuildContext context, String title, IconData icon,
      Color color, Widget page) {
    return Padding(
      padding: const EdgeInsets.symmetric(horizontal: 32),
      child: ElevatedButton(
        onPressed: () {
          Navigator.push(
            context,
            MaterialPageRoute(builder: (context) => page),
          );
        },
        style: ElevatedButton.styleFrom(
          backgroundColor: color.withOpacity(0.1),
          foregroundColor: color,
          padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 20),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(16),
          ),
          elevation: 0,
        ),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Icon(icon, size: 28),
            const SizedBox(width: 12),
            Text(
              title,
              style: const TextStyle(
                fontSize: 18,
                fontWeight: FontWeight.bold,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
8
likes
0
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides AI chat functionality with enhanced features including OpenAI, Google Gemini, and Claude AI integrations, voice recognition, and multimodal support.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dart_openai, equatable, flutter, freezed_annotation, google_generative_ai, http, json_annotation, provider

More

Packages that depend on ai_chat_plus