add ai init gemini

This commit is contained in:
2024-07-07 10:53:33 +02:00
parent 97baed995b
commit 3ad8eb9033
2 changed files with 53 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:io';
import 'DisplayPictureScreen.dart';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gemini/flutter_gemini.dart';
@@ -126,20 +127,3 @@ class CameraState extends State<Camera> {
);
}
}
// A widget that displays the picture taken by the user.
class DisplayPictureScreen extends StatelessWidget {
final String imagePath;
const DisplayPictureScreen({super.key, required this.imagePath});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Display the Picture')),
// The image is stored as a file on the device. Use the `Image.file`
// constructor with the given path to display the image.
body: Image.file(File(imagePath)),
);
}
}