Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
2 changes: 1 addition & 1 deletion example/android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pluginManagement {

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.0" apply false
id("com.android.application") version "8.9.1" apply false
// START: FlutterFire Configuration
id("com.google.gms.google-services") version("4.3.15") apply false
// END: FlutterFire Configuration
Expand Down
2 changes: 0 additions & 2 deletions example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>13.0</string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PODS:
- PromisesObjC (~> 2.4)
- camera_avfoundation (0.0.1):
- Flutter
- device_info_plus (0.0.1):
- Flutter
- file_selector_ios (0.0.1):
- Flutter
- Firebase/Auth (12.4.0):
Expand Down Expand Up @@ -77,6 +79,8 @@ PODS:
- GTMSessionFetcher/Core (5.0.0)
- image_picker_ios (0.0.1):
- Flutter
- irondash_engine_context (0.0.1):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand All @@ -87,20 +91,25 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- super_native_extensions (0.0.1):
- Flutter
- url_launcher_ios (0.0.1):
- Flutter

DEPENDENCIES:
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_selector_ios (from `.symlinks/plugins/file_selector_ios/ios`)
- firebase_app_check (from `.symlinks/plugins/firebase_app_check/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- Flutter (from `Flutter`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- record_ios (from `.symlinks/plugins/record_ios/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- super_native_extensions (from `.symlinks/plugins/super_native_extensions/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

SPEC REPOS:
Expand All @@ -122,6 +131,8 @@ SPEC REPOS:
EXTERNAL SOURCES:
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
file_selector_ios:
:path: ".symlinks/plugins/file_selector_ios/ios"
firebase_app_check:
Expand All @@ -134,18 +145,23 @@ EXTERNAL SOURCES:
:path: Flutter
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
irondash_engine_context:
:path: ".symlinks/plugins/irondash_engine_context/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
record_ios:
:path: ".symlinks/plugins/record_ios/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
super_native_extensions:
:path: ".symlinks/plugins/super_native_extensions/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f
camera_avfoundation: 281867ff09f1da66f031a184ecfbc6f2e625c9f5
device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
file_selector_ios: 80c12e90ad3f2045ed6819d03742f1a4c5ec3f93
Firebase: f07b15ae5a6ec0f93713e30b923d9970d144af3e
firebase_app_check: 53a9efd793edad49230d8d49b19cb8d47b8450ed
Expand All @@ -162,11 +178,13 @@ SPEC CHECKSUMS:
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
GTMSessionFetcher: 02d6e866e90bc236f48a703a041dfe43e6221a29
image_picker_ios: 4f2f91b01abdb52842a8e277617df877e40f905b
irondash_engine_context: 3458bf979b90d616ffb8ae03a150bafe2e860cc9
path_provider_foundation: 0b743cbb62d8e47eab856f09262bb8c1ddcfe6ba
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
RecaptchaInterop: 11e0b637842dfb48308d242afc3f448062325aba
record_ios: 840d21cce013c5a3b2168b74a54ebdb4136359e2
shared_preferences_foundation: 5086985c1d43c5ba4d5e69a4e8083a389e2909e6
super_native_extensions: 4916b3c627a9c7fffdc48a23a9eca0b1ac228fa7
url_launcher_ios: bb13df5870e8c4234ca12609d04010a21be43dfa

PODFILE CHECKSUM: 7773a3d1e948b3cef227c6713241e4fcfe42cda9
Expand Down
7 changes: 5 additions & 2 deletions example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ import Flutter
import UIKit

@main
@objc class AppDelegate: FlutterAppDelegate {
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}
27 changes: 23 additions & 4 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand Down Expand Up @@ -30,6 +32,27 @@
<string>$(PRODUCT_NAME) would like to access your microphone.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to your photos.</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand All @@ -49,9 +72,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
102 changes: 102 additions & 0 deletions example/lib/custom_strings/custom_strings.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Copyright 2025 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:firebase_ai/firebase_ai.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_ai_toolkit/flutter_ai_toolkit.dart';

import '../firebase_options.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
runApp(const App());
}

class App extends StatelessWidget {
static const title = 'Example: Google Gemini AI';

const App({super.key});

@override
Widget build(BuildContext context) =>
const MaterialApp(title: title, home: CustomStringsExample());
}

class CustomStringsExample extends StatelessWidget {
static const title = 'Custom Chat Strings';

const CustomStringsExample({super.key});

@override
Widget build(BuildContext context) {
final customStrings = const LlmChatViewStrings(
addAttachment: 'Add',
attachFile: 'Attach File',
takePhoto: 'Take Photo',
stop: '⏹️ Stop',
close: '❌ Close',
cancel: '❌ Cancel',
copyToClipboard: '📋 Copy',
editMessage: '✏️ Edit',
attachImage: '🖼️ Add Image',
recordAudio: '🎤 Record',
submitMessage: '📤 Send',
closeMenu: '❌ Close Menu',

// Message related
typeAMessage: 'Type your message here...',
recording: '🔴 Recording...',
tapToStop: 'Tap to stop',
tapToRecord: 'Tap to record',
releaseToCancel: 'Release to cancel',
slideToCancel: 'Slide to cancel',

submit: 'Submit',
send: 'Send',
delete: '🗑️ Delete',
edit: '✏️ Edit',
copy: '📋 Copy',
share: '↗️ Share',
retry: '🔄 Retry',
yes: '✅ Yes',
no: '❌ No',
clear: '🗑️ Clear',
search: '🔍 Search',

// Messages and errors
messageCopiedToClipboard: '📋 Copied to clipboard!',
editing: '✏️ Editing',
error: '❌ Error',
cancelMessage: 'Cancel',
confirmDelete: 'Confirm Delete',
areYouSureYouWantToDeleteThisMessage:
'Are you sure you want to delete this message?',
errorSendingMessage: '❌ Failed to send message',
errorLoadingMessages: '❌ Failed to load messages',
noMessagesYet: 'No messages yet. Start the conversation!',
tapToRetry: 'Tap to retry',
noResultsFound: 'No results found',
unableToRecordAudio: 'Unable to record audio',
unsupportedImageSource: 'Unsupported image source',
unableToPickImage: 'Unable to pick image',
unableToPickFile: 'Unable to pick file',
unableToPickUrl: 'Unable to process URL',
);

return Scaffold(
appBar: AppBar(title: const Text(App.title)),
body: LlmChatView(
provider: FirebaseProvider(
model: FirebaseAI.googleAI().generativeModel(
model: 'gemini-2.0-flash',
),
),
strings: customStrings,
style: LlmChatViewStyle(strings: customStrings),
),
);
}
}
8 changes: 8 additions & 0 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,30 @@
import FlutterMacOS
import Foundation

import device_info_plus
import file_selector_macos
import firebase_app_check
import firebase_auth
import firebase_core
import irondash_engine_context
import mac_menu_bar
import path_provider_foundation
import record_macos
import shared_preferences_foundation
import super_native_extensions
import url_launcher_macos

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseAppCheckPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAppCheckPlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
IrondashEngineContextPlugin.register(with: registry.registrar(forPlugin: "IrondashEngineContextPlugin"))
MacMenuBarPlugin.register(with: registry.registrar(forPlugin: "MacMenuBarPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
RecordMacOsPlugin.register(with: registry.registrar(forPlugin: "RecordMacOsPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SuperNativeExtensionsPlugin.register(with: registry.registrar(forPlugin: "SuperNativeExtensionsPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}
Loading