add package fluter_gemini

This commit is contained in:
2024-07-07 10:32:39 +02:00
parent 23a42890b1
commit 97baed995b
3 changed files with 52 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import 'dart:io';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gemini/flutter_gemini.dart';
Future<void> main() async {
// Ensure that plugin services are initialized so that `availableCameras()`
@@ -12,6 +13,8 @@ Future<void> main() async {
// Obtain a list of the available cameras on the device.
final cameras = await availableCameras();
Gemini.init(apiKey: 'AIzaSyAt1LQIV_hwJQF56sXjb4oxEZEC0wI3PKg');
// Get a specific camera from the list of available cameras.
final firstCamera = cameras.first;