Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMar 29, 2026·1 min de lecture

Gemini CLI Extension: Flutter — Cross-Platform App Dev

Gemini CLI extension for Flutter development. Widget creation, state management, navigation, and platform-specific code generation.

Prêt pour agents

Staging sûr pour cet actif

Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.

Stage only · 17/100Policy : staging
Surface agent
Tout agent MCP/CLI
Type
CLI Tool
Installation
Stage only
Confiance
Confiance : Community
Point d'entrée
Gemini CLI Extension: Flutter
Commande de staging sûr
npx -y tokrepo@latest install 7d515779-d57f-4604-a034-630ce676e80f --target codex

Stage les fichiers d'abord; l'activation exige la revue du README et du plan staged.

TL;DR
Gemini CLI Flutter extension provides AI-assisted widget creation, state management, and cross-platform code generation.
§01

What it is

The Gemini CLI Flutter extension is an official Google extension that adds Flutter development capabilities to the Gemini command-line interface. It assists with widget creation, state management patterns, navigation setup, and platform-specific code generation for iOS, Android, web, and desktop targets.

It targets Flutter developers who want AI assistance for scaffolding components, debugging layout issues, and generating boilerplate code for common patterns like forms, lists, and navigation flows.

§02

How it saves time or tokens

Flutter apps require significant boilerplate for state management, routing, and platform channels. This extension generates idiomatic Dart code for common patterns, reducing the time spent on repetitive scaffolding. Instead of manually writing StatefulWidget boilerplate or Provider setup, you describe what you need and the extension produces the code. The estimated token usage is around 500 tokens per interaction.

§03

How to use

  1. Install the extension via Gemini CLI:
gemini extensions install flutter
  1. Ask for widget generation:
gemini 'Create a responsive product card widget with image, title, price, and add-to-cart button'
  1. Generate state management boilerplate:
gemini 'Set up Riverpod state management for a shopping cart with add, remove, and clear operations'
§04

Example

Generating a navigation setup with GoRouter:

import 'package:go_router/go_router.dart';

final router = GoRouter(
  routes: [
    GoRoute(
      path: '/',
      builder: (context, state) => const HomeScreen(),
      routes: [
        GoRoute(
          path: 'product/:id',
          builder: (context, state) {
            final id = state.pathParameters['id']!;
            return ProductScreen(productId: id);
          },
        ),
        GoRoute(
          path: 'cart',
          builder: (context, state) => const CartScreen(),
        ),
      ],
    ),
  ],
);
§05

Related on TokRepo

§06

Common pitfalls

  • Generated widgets may not follow your project's existing design system. Always review and adapt the output to match your theme and component library.
  • State management patterns generated by the extension default to common approaches. Verify they align with your chosen state management solution (Bloc, Riverpod, Provider).
  • Platform-specific code may need manual testing on each target platform, as the extension cannot verify native API availability.

Questions fréquentes

Does the Flutter extension work with existing projects?+

Yes. The extension analyzes your project context and generates code that fits your existing structure. It reads your pubspec.yaml and existing widgets to provide contextually relevant suggestions.

Which state management solutions does it support?+

The extension can generate code for Provider, Riverpod, Bloc, GetX, and vanilla StatefulWidget patterns. Specify your preference in the prompt for targeted output.

Can it generate platform-specific native code?+

Yes. The extension can generate platform channel code for iOS (Swift), Android (Kotlin), and desktop targets. It produces both the Dart side and the native side of method channels.

Does it support Flutter web and desktop?+

Yes. The extension handles web-specific considerations like responsive layouts and desktop-specific features like menu bars and window management. Specify your target platform in the prompt.

How is this different from using Gemini directly for Flutter?+

The extension has specialized context about Flutter APIs, widget trees, and Dart conventions. It produces more idiomatic Flutter code than a generic LLM prompt because it is trained on Flutter-specific patterns and best practices.

Sources citées (3)
🙏

Source et remerciements

Created by Google. Licensed under Apache 2.0. gemini-cli-extensions/flutter Part of Gemini CLI — ⭐ 99,400+

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires