Flutter x Gemini

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.

Screenshots

What is Gemini

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.

What is Flutter

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.

What is Riverpod

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.

How to run

  1. Clone the repo by running git clone https://github.com/abdulrehman04/Flutter-x-Gemini.git

  2. Run `flutter pub get' in the root of the project

  3. Get the API_Key from Google AI Studio

  4. Place the API_KEY in .env in the root of the project

  5. Run the project using flutter run

Next steps

  • 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 🙌.