flutter_gemma 1.0.0-rc.1 copy "flutter_gemma: ^1.0.0-rc.1" to clipboard
flutter_gemma: ^1.0.0-rc.1 copied to clipboard

A Flutter plugin for running Gemma and other LLMs locally on Android, iOS, Web, and Desktop. Supports multimodal vision, audio, function calling, thinking mode, GPU acceleration, text embeddings, and [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_gemma_example/gemma_bootstrap.dart';
import 'package:flutter_gemma_example/home_screen.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize Flutter Gemma via the shared bootstrap helper (single source of
  // truth for the engine/backend lists, shared with the RAG demo's runtime
  // store switcher). RAG is opt-in as of 1.0; the example starts on the sqlite
  // store and lets the RAG demo switch to qdrant at runtime on native platforms.
  await bootstrapGemma(ragBackend: RagBackend.sqlite);

  runApp(const ChatApp());
}

class ChatApp extends StatelessWidget {
  const ChatApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Gemma Example',
      darkTheme: ThemeData(
        brightness: Brightness.dark,
        textTheme: const TextTheme(
          bodyLarge: TextStyle(color: Colors.white),
          bodyMedium: TextStyle(color: Colors.white),
        ),
      ),
      themeMode: ThemeMode.dark,
      home: const SafeArea(child: HomeScreen()),
    );
  }
}
384
likes
120
points
16.5k
downloads

Documentation

API reference

Publisher

verified publishermobilepeople.dev

Weekly Downloads

A Flutter plugin for running Gemma and other LLMs locally on Android, iOS, Web, and Desktop. Supports multimodal vision, audio, function calling, thinking mode, GPU acceleration, text embeddings, and on-device RAG.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

background_downloader, code_assets, crypto, flutter, flutter_web_plugins, hooks, large_file_handler, meta, mutex, path, path_provider, plugin_platform_interface, shared_preferences

More

Packages that depend on flutter_gemma

Packages that implement flutter_gemma