)]}'
{
  "commit": "de689bb2380fe8ee6cc4f6a9ef26167b676fe5ca",
  "tree": "3f5fde44f0712e79802e012ccddf9a08b71e8f07",
  "parents": [
    "52c523448da2c1ddbba3b56309773fd6e75937f7"
  ],
  "author": {
    "name": "flutteractionsbot",
    "email": "154381524+flutteractionsbot@users.noreply.github.com",
    "time": "Tue Nov 24 13:40:21 2026 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Nov 24 21:40:21 2026 +0000"
  },
  "message": "[beta] [flutter_tools] Support standalone UI packages in gen-l10n (#197318)\n\nCherry-pick of https://github.com/flutter/flutter/pull/194500.\n\nThis pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)\nPlease fill in the form below, and a flutter domain expert will evaluate this cherry pick request.\n\n### Issue Link:\nhttps://github.com/flutter/flutter/issues/191072\nhttps://github.com/flutter/flutter/issues/196475\nhttps://github.com/flutter/flutter/issues/196770\n\n### Impact Description:\nImpacts app development and static analysis for Flutter apps that use `gen-l10n` (`flutter: generate: true`) and migrate to the standalone UI packages (`package:material_ui` and `package:cupertino_ui`). `gen-l10n` generates `app_localizations.dart` importing `package:flutter/widgets.dart` and `package:flutter_localizations/flutter_localizations.dart` and referencing deprecated `GlobalMaterialLocalizations`/`GlobalCupertinoLocalizations`, which causes `deprecated_member_use` / `unnecessary_import` analyzer diagnostics or missing Material/Cupertino localization delegates at runtime.\n\n### Changelog Description:\n[flutter/191072] When generating localizations with `gen-l10n` in an app using standalone `material_ui` or `cupertino_ui` packages, `app_localizations.dart` imports `flutter_localizations` and `flutter/widgets.dart` instead of the standalone UI package delegates.\n\n### Workaround:\nUsers must manually add `...GlobalMaterialLocalizations.delegates` / `...GlobalCupertinoLocalizations.delegates` in their `MaterialApp` / `CupertinoApp` and exclude the generated `app_localizations.dart` file from static analysis.\n\n### Risk:\nWhat is the risk level of this cherry-pick?\n\n### Test Coverage:\nAre you confident that your fix is well-tested by automated tests?\n\n### Validation Steps:\n1. Run `packages/flutter_tools/test/general.shard/generate_localizations_test.dart` and `packages/flutter_tools/test/general.shard/build_system/targets/localizations_test.dart`.\n2. Run `packages/flutter_tools/test/integration.shard/gen_l10n_test.dart` (specifically the `material_ui` standalone UI package test).\n3. In a Flutter app depending on `material_ui` or `cupertino_ui` with `flutter: generate: true`, run `flutter gen-l10n` and `flutter analyze --fatal-infos` and verify no warnings or errors are reported.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b1b539ca1f0850c6e19900cbd889b47e84f0ea9c",
      "old_mode": 33188,
      "old_path": "dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings.dart",
      "new_id": "55557eed1ef19ed7d7d41b73724cd97a4ac3d79b",
      "new_mode": 33188,
      "new_path": "dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings.dart"
    },
    {
      "type": "modify",
      "old_id": "e294424631f1154397e19675a961a54417150af2",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/lib/src/build_system/targets/localizations.dart",
      "new_id": "3484543fc736e7e9326c79d46d8fa262a902c07a",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/lib/src/build_system/targets/localizations.dart"
    },
    {
      "type": "modify",
      "old_id": "5c66dcb9e5a9f203d01dd7a03871b1cc825dc5a5",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/lib/src/localizations/gen_l10n.dart",
      "new_id": "b9e24aedc914ca1447420098564cb1f54f1bc5c3",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/lib/src/localizations/gen_l10n.dart"
    },
    {
      "type": "modify",
      "old_id": "c35fcbeebf5b8138746a6b801430b638b3105a5a",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/lib/src/localizations/gen_l10n_templates.dart",
      "new_id": "8bd221ea55d81fe93065412677efac67c128e013",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/lib/src/localizations/gen_l10n_templates.dart"
    },
    {
      "type": "modify",
      "old_id": "6c617981ff176e2572855d70bc0e9183a809b4e4",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/test/general.shard/build_system/targets/localizations_test.dart",
      "new_id": "7ea187045525b0db19e9099e0f3925af8a789487",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/general.shard/build_system/targets/localizations_test.dart"
    },
    {
      "type": "modify",
      "old_id": "7847ba4b94f215d133f07d2b76d8d587d43ed25c",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/test/general.shard/generate_localizations_test.dart",
      "new_id": "ff8188ac2f1e7960a5aa46babf8d8ce5c803475e",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/general.shard/generate_localizations_test.dart"
    },
    {
      "type": "modify",
      "old_id": "66b287e9aab4dc584bd8a7e4e257374a3d20c8be",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/test/integration.shard/gen_l10n_test.dart",
      "new_id": "95c3448ce70a012a7976558a4da94d6fb2bdb79f",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/integration.shard/gen_l10n_test.dart"
    },
    {
      "type": "modify",
      "old_id": "b7fe9d150d566d780e4509efd8fd31f40f8c4074",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/test/integration.shard/test_data/gen_l10n_project.dart",
      "new_id": "48cf53646b0a1be70e16a35e8c6ab50dffbb37e3",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/integration.shard/test_data/gen_l10n_project.dart"
    }
  ]
}
