Skip to content
Boring Doc
BreakingHigh impactOfficial migration guidesince 3.32.0landed 3.28.0-0.0.pre

Localized messages are generated into source, not a synthetic package

Framework · Official source

The `flutter` tool will no longer generate a synthetic `package:flutter_gen` or modify the `package_config.json` of the app.

Who is affected
Applications and packages relying on the previous behaviour or signature.
Practical impact
Behaviour or API differences that can break builds or change runtime behaviour.
What action should I take?
Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.
Migration checklist0/2
Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)

This change only affects apps that have the following entry in their pubspec.yaml:

flutter:
  generate: true

If your app previously used gen-l10n without this property, it is now required.

A synthetic package (package:flutter_gen) is created and referenced by the app:

import 'package:flutter_gen/gen_l10n/app_localizations.dart';
// ...
const MaterialApp(
  title: 'Localizations Sample App',
  localizationsDelegates: AppLocalizations.localizationsDelegates,
  supportedLocales: AppLocalizations.supportedLocales,
);

To migrate away from importing package:flutter_gen:

  1. Update configuration. Specify synthetic-package: false in the accompanying [l10n.yaml][] file:

    synthetic-package: false
    
    # The files are generated into the path specified by `arb-dir`
    arb-dir: lib/i18n
    
    # Or, specifically provide an output path:
    output-dir: lib/src/generated/i18n
  2. Update imports. Update your Dart import statements to point to the new location of the generated files:

    // Before
    import 'package:flutter_gen/gen_l10n/app_localizations.dart';
    
    // After (assuming arb-dir: lib/i18n, importing from lib/main.dart)
    import 'i18n/app_localizations.dart';
Migration assistantAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Official migration guide·Verified classification (95%)

Listed in the official breaking-changes index (docs.flutter.dev/release/breaking-changes).

An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.

Source commit
b3045439b7c0
Source last updated
Oct 21, 2026
Last synchronized
Oct 21, 2026
Publication status
published
Publication history
  • Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI explanationAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Was this useful?