A Flutter chat application that uses the google_generative_ai
package.
To use the Gemini API, you'll need an API key. If you don't already have one, create a key in Google AI Studio: https://aistudio.google.com/app/apikey.
When running the app, include your API key using the --dart-define
flag:
flutter run --dart-define=API_KEY=$GEMINI_API_KEY
If you use VSCode, you can specify --dart-define
variables in your
launch.json file.
If you use Android Studio or IntelliJ you can use run / debug configurations (https://www.jetbrains.com/help/idea/run-debug-configuration.html).