Skip to content

ANTONINEUTRON/io_extended_24_demo_app

Repository files navigation

Flutter Gemini Integration Demo App

Overview

This is a demo Flutter application developed to showcase the integration of the Gemini AI model into a Flutter app for cross-platform solutions.

It is for a presentation made at GDGLafia IO Extended 2024 Event.

The slide presented at the event can be accessed via Clicking Here

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/flutter-gemini-demo.git
    cd flutter-gemini-demo
  2. Install dependencies:

    flutter pub get
  3. Configure API Key:

    • Open lib/pages/chat_page.dart.
    • Replace the _geminiAPIKey with your Gemini API key.

Running the App

  • Run on an emulator or connected device:
    flutter run

Usage

  1. Launch the app on your device.
  2. Interact with the AI-powered chat by typing messages into the text field at the bottom of the screen and pressing the send button.
  3. Observe AI responses generated by the Gemini model.

Code Structure

  • lib/main.dart: Entry point of the application.
  • lib/pages/chat_page.dart: Main chat page with AI integration.
  • lib/model/chat.dart: Data model for chat messages.

Dependencies

  • flutter/material.dart: Flutter framework.
  • google_generative_ai: Package for interacting with the Gemini AI model.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

PS:

This application was built without taking into considerations good coding practices

In an actual

  • API key should be store in a secrets store or as environment variable
  • Separation of concern of various part of the app (i.e everything shouldn't be cramped into one file)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published