Repository navigation
Open
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Steps to reproduce
In an internationalized app with .arb files.
- Migrate to flutter 3.47 and standalone UI packages following those instructions: https://flutter.dev/blog/whats-new-in-flutter-3-47
- Execute:
flutter gen-l10nExpected results
The localization file (app_localizations.dart with below configuration) compatible with standalone UI package according to migration guide: https://flutter.dev/blog/whats-new-in-flutter-3-47:
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:material_ui/material_ui.dart';
import 'package:intl/intl.dart' as intl;
...
/// A list of this localizations delegate along with the default localizations
/// delegates.
///
/// Returns a list of localizations delegates containing this delegate along with
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
/// and GlobalWidgetsLocalizations.delegate.
///
/// Additional delegates can be added by appending to this list in
/// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
delegate,
...GlobalMaterialLocalizations.delegates,
];
...Actual results
Below is the generated localization file (app_localizations.dart with below configuration), depending on embedded UI packages.
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;
...
/// A list of this localizations delegate along with the default localizations
/// delegates.
///
/// Returns a list of localizations delegates containing this delegate along with
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
/// and GlobalWidgetsLocalizations.delegate.
///
/// Additional delegates can be added by appending to this list in
/// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];
...Flutter gen-l10n should have an option to generate code with either embedded or standalone UI packages. The result is a crash because of missing UI packages translation. The workaround is to add GlobalMaterialLocalizations.delegates to localizations definition in MaterialApp.
Code sample
Code sample
Content of my l10n.yaml:
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
header: "// dart format off\n// @formatter:off"Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
======== Exception caught by widgets library =======================================================
The following assertion was thrown building RawChip(dirty, dependencies: [_LocalizationsScope-[GlobalKey#414be]], state: _RawChipState#67182(tickers: tracking 4 tickers)):
No MaterialLocalizations found.
RawChip widgets require MaterialLocalizations to be provided by a Localizations widget ancestor.
The material library uses Localizations to generate messages, labels, and abbreviations.
To introduce a MaterialLocalizations, either use a MaterialApp at the root of your application to include them automatically, or add a Localization widget with a MaterialLocalizations delegate.Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.47.0, on macOS 26.6.1 25G76 darwin-arm64, locale en-US) [460ms]
• Flutter version 3.47.0 on channel stable at /Users/geoffrey/Develop/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cf2416426 (2 days ago), 2026-08-11 11:53:49 -0700
• Engine revision 5f77625673
• Dart version 3.13.0
• DevTools version 2.60.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [1,251ms]
• Android SDK at /Users/geoffrey/Library/Android/sdk
• Emulator version unknown
• Platform android-37.0, build-tools 37.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 25.0.2+-15348964-b329.117)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 26.6) [1,118ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17F113
• CocoaPods version 1.17.0
[✓] Chrome - develop for the web [47ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (3 available) [6.2s]
• Pixel 8a (mobile) • 48081JEKB02513 • android-arm64 • Android 17 (API 37)
• macOS (desktop) • macos • darwin-arm64 • macOS 26.6.1 25G76 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 151.0.7922.109
[✓] Network resources [114.0s]
• All expected network resources are available.
• No issues found!Reacted by Matthias Ngeo, Sherif Metwally, Piotr Orzechowski, qeep.mobi, Michael Mairegger, Aaron Madlon-Kay, christopher-schott, Eivind Valderhaug, Chris Bobbe, Piotr Rogulski and 10 more
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Activity
mbcorona commentedon Aug 13, 2026
Confirmed from the source. The gen-l10n template hardcodes the flutter_localizations import and a fixed delegate list, with no option for the standalone material_ui/cupertino_ui packages, so the 3.47 migration path generates code that crashes with "No MaterialLocalizations found".
Sending this to the tool team. Related to the localization decoupling in #188757.
Fix breakage on non-en locales
l10n [nfc]: Suppress new deprecation warnings from flutter_localizations
deps: Migrate to `package:material_ui` and `package:cupertino_ui`
amake commentedon Nov 11, 2026
This is now more urgent in my view because Flutter 3.50 (now stable) flags the usages of
Global{Material,Cupertino}Localizationsas deprecated:So you can't have a clean
flutter analyzeresult with the generated files as-is.JohnAtTimeless commentedon Nov 12, 2026
Since 3.50, this is affecting our CI build and I have to ignore the linting of
app_localizations.dartto silent the warnings.runoob-coder commentedon Nov 12, 2026
add to your
l10n.yamlProblem: Flutter 3.50 deprecates the Material library the app imports…
chore: upgrade the scoreboard to Flutter 3.50 (#429)