A small starter implementation of Gemini into Flutter using Riverpod. The Gemini API offers multiple usecases, this repo is an implementation of a few of them.
Gemini is a large language model developed by Google AI. Trained on a vast corpus of publicly available data, it excels at communication and generating human-like text in response to a wide range of prompts and questions. Unlike other large language models, such as ChatGPT, Gemini offers a key advantage: it can process both text and image inputs simultaneously. This multimodal capability allows users to provide richer context for their queries, leading to more nuanced and informative responses from Gemini.
Flutter is an open-source UI framework from Google that lets you build beautiful apps for mobile (Android & iOS), web, and desktop (Windows, macOS, Linux) using a single codebase. This means faster development and easier maintenance.
Riverpod, designed for Flutter applications, streamlines state management, data fetching, and error handling. It acts as a central hub for your app's state, ensuring data consistency and easy access. Riverpod also implements reactive updates, automatically rebuilding UI components whenever the underlying state changes. Additionally, it simplifies dependency injection, making it easier to manage connections between different parts of your Flutter code. In essence, Riverpod empowers you to write cleaner, more maintainable, and efficient Flutter apps.
-
Clone the repo by running
git clone https://github.com/abdulrehman04/Flutter-x-Gemini.git
-
Run `flutter pub get' in the root of the project
-
Get the API_Key from Google AI Studio
-
Place the API_KEY in
.env
in the root of the project -
Run the project using
flutter run
- Setup text-based queries
- Setup text and image based queries
- Setup multiturn conversation/chat
Feel free to fork, open PRs and contribute. Star the repo to show love 🙌.