Gemini Chat FAB
A Flutter package that adds a pre-built Floating Action Button to your app, launching a beautiful and fully functional chat interface powered by the Google Gemini API.
Features
- β Simple, one-line installation.
- π¬ Streaming responses for a real-time feel.
- π¨ Adapts to your app's theme.
- π Lightweight and dependency-free.
Installation
Add this to your app's pubspec.yaml file:
dependencies:
gemini_chat_fab: ^1.1.0 # Use the latest version
Usage
Simply place the GeminiChatFab widget in the floatingActionButton property of your Scaffold.
Make sure to provide your API key when running the app:
flutter run --dart-define=GEMINI_API_KEY=YOUR_KEY_HERE
Flow
Add this in your file.
geminiApiKey = String.fromEnvironment('GEMINI_API_KEY');
Then simply add
floatingActionButton: const GeminiChatFab(
apiKey: geminiApiKey,
systemPrompt: "Enter whatever prompt to tailor your needs.",)