generate_ai_dart 0.0.1 copy "generate_ai_dart: ^0.0.1" to clipboard
generate_ai_dart: ^0.0.1 copied to clipboard

dart package for gemini api

example/lib/main.dart

import 'package:flutter/material.dart';

import 'ChatExample.dart';
import 'GeminiProExample.dart';
import 'VisionProExample.dart';

void main() {
  runApp(const MaterialApp(home: MainPage(),debugShowCheckedModeBanner: false,));
}


class MainPage extends StatelessWidget {


  const MainPage({super.key,});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Navigation'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text("Gemini ProVision example"),
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => const VisionProExample()),
                );
              },
              child: const Text('test'),
            ),
            const SizedBox(height: 20),
            const Text("Gemini Pro example"),
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => const GeminiProExample()),
                );
              },
              child: const Text('test'),
            ),

            const Text("Chat  example"),
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => const ChatPage()),
                );
              },
              child: const Text('test'),
            ),
          ],
        ),
      ),
    );
  }
}
3
likes
120
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

dart package for gemini api

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

dio, flutter, image_compression_flutter, mutex, rxdart

More

Packages that depend on generate_ai_dart