A Flutter project demonstrating the integration of Google Generative AI.
This project showcases how to use Google Generative AI within a Flutter application. It includes examples of generating text responses and streaming responses based on user input.
- Generate text responses using Google Generative AI.
- Stream text responses in real-time.
- Simple and intuitive UI.
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/generative_ai_example.git cd generative_ai_example
-
Install dependencies:
flutter pub get
-
Run the app:
flutter run --dart-define=AI_API_KEY=your_api_key_here
- Enter a prompt: Type a prompt into the text field.
- Get Response: Click on the "Get Response" button to receive a text response.
- Get Stream Response: Click on the "Get Stream Response" button to receive a streaming response.
![]() |
![]() |
---|
Contributions are welcome! Please fork the repository and submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.