flutter_gemma 0.10.6  flutter_gemma: ^0.10.6 copied to clipboard
flutter_gemma: ^0.10.6 copied to clipboard
The plugin allows running the Gemma AI model locally on a device from a Flutter application. Includes support for Gemma 3 Nano models with optimized MediaPipe GenAI v0.10.24.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_gemma_example/home_screen.dart';
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  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()),
    );
  }
}