flutter_chatgpt 1.0.2 copy "flutter_chatgpt: ^1.0.2" to clipboard
flutter_chatgpt: ^1.0.2 copied to clipboard

Easy to use ChatGPT Client for Flutter

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_chatgpt/chatgpt.dart';

Future<void> main() async {
  await ChatGPT.init("sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); // Replace with your API Key
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text("ChatGPT Example"),
        ),
        body: Center(
          child: Text('CHATGPT EXAMPLE'),
        ),
      ),
    );
  }
}