)]}'
{
  "commit": "3de63c8fbec271c751b82035bf10b18478e63ec4",
  "tree": "02acb6add50420442d58f9edcdb1c7a92753f09c",
  "parents": [
    "20928d58f50700f7bb08e1146e204cded334aabf"
  ],
  "author": {
    "name": "PRANTA Dutta",
    "email": "44747303+theprantadutta@users.noreply.github.com",
    "time": "Thu Jul 09 21:10:13 2026 +0600"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Jul 09 15:10:13 2026 +0000"
  },
  "message": "[pigeon] Add usage docs to generated Dart event channel methods (#11894)\n\nThe generated event-channel method creates a new `EventChannel` each time it is called, but nothing in the generated code documented that — making it easy to call repeatedly for the same instance, or to assume the returned stream is single-subscription. This implements the \"definitely\" part of the linked issue:\n\n\u003e Definitely add docs to the generated code, indicated both that it shouldn\u0027t be called multiple times for the same instance, and that the returned stream is a broadcast stream.\n\nEach generated event-channel method now gets a usage doc comment:\n\n```dart\n/// Returns a broadcast [Stream] of events from the `streamEvents` event channel.\n///\n/// Each call to this method creates a new [EventChannel], so it should\n/// not be called multiple times for the same `instanceName`. To deliver\n/// events to multiple listeners, call this method once and listen to the\n/// returned broadcast stream multiple times instead.\n```\n\nWhile there, this also emits the user\u0027s own documentation comments on event channel methods — previously only the API-level comments were emitted and per-method comments were silently dropped. The two are combined via the existing `generatorComments` mechanism in `addDocumentationComments`, which already handles user-comment/generator-comment separation.\n\nThe wrapper-object and renaming ideas from the issue are intentionally not addressed here, per the discussion — those are design decisions; this PR is scoped to the documentation gap.\n\nChecked-in generated files containing event channels (`example/app` and `shared_test_plugin_code`) are regenerated. The new generator test verifies both the user comments and the usage docs are emitted directly above the generated method, and fails without the generator change.\n\nFixes https://github.com/flutter/flutter/issues/177776\n\n## Pre-Review Checklist\n\nNote: the multi-language auto-formatter step of `tool/generate.dart` could not run fully on this machine (missing clang-format and related binaries); only Dart outputs changed, and those were formatted with `dart format`. If CI\u0027s format check flags anything, I\u0027ll address it.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a87e4e99eee6b8be4df08b5d11fa19dad02941eb",
      "old_mode": 33188,
      "old_path": "packages/pigeon/CHANGELOG.md",
      "new_id": "803f62bc511802d6e8e8dea1da4998049ef84439",
      "new_mode": 33188,
      "new_path": "packages/pigeon/CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "28217b3755f5355946d9aa4cfe2fef8bd287f4d3",
      "old_mode": 33188,
      "old_path": "packages/pigeon/example/app/lib/src/event_channel_messages.g.dart",
      "new_id": "d13b926f2a081ed14744f1d7cda92a5706ea948f",
      "new_mode": 33188,
      "new_path": "packages/pigeon/example/app/lib/src/event_channel_messages.g.dart"
    },
    {
      "type": "modify",
      "old_id": "ae0614a4a788c758231c55a61b13a358a4498522",
      "old_mode": 33188,
      "old_path": "packages/pigeon/lib/src/dart/dart_generator.dart",
      "new_id": "3218103e59530d24272362793e78a6998770dae2",
      "new_mode": 33188,
      "new_path": "packages/pigeon/lib/src/dart/dart_generator.dart"
    },
    {
      "type": "modify",
      "old_id": "4cc20cfd1cfa56fd0e43803c1b23e94a9063b731",
      "old_mode": 33188,
      "old_path": "packages/pigeon/lib/src/generator_tools.dart",
      "new_id": "dbc56d4823b8e21e881824a290888472f5880a72",
      "new_mode": 33188,
      "new_path": "packages/pigeon/lib/src/generator_tools.dart"
    },
    {
      "type": "modify",
      "old_id": "48d008b0092906f95267ce9402be374cd4bfbc1c",
      "old_mode": 33188,
      "old_path": "packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart",
      "new_id": "960283770445137e7792d8dc2f2c1f56d1daf7e7",
      "new_mode": 33188,
      "new_path": "packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart"
    },
    {
      "type": "modify",
      "old_id": "1bc0680e378be0610196fa60bd60a7b9b59d8b55",
      "old_mode": 33188,
      "old_path": "packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_without_classes_tests.gen.dart",
      "new_id": "d6c39f9ea9a1ae483f3f8e8ab1b454b72c36ad1f",
      "new_mode": 33188,
      "new_path": "packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_without_classes_tests.gen.dart"
    },
    {
      "type": "modify",
      "old_id": "65afaca2890fde467ce9d2e971a45fea82378f79",
      "old_mode": 33188,
      "old_path": "packages/pigeon/pubspec.yaml",
      "new_id": "bf3b9563ca90228fe03878ffb41ee087f438da74",
      "new_mode": 33188,
      "new_path": "packages/pigeon/pubspec.yaml"
    },
    {
      "type": "modify",
      "old_id": "695b9a97c8c551dbe68dfb4ba4eb61e29c26e2d8",
      "old_mode": 33188,
      "old_path": "packages/pigeon/test/dart_generator_test.dart",
      "new_id": "dce12d0c203457ba119d9d3105dcb816bf00c353",
      "new_mode": 33188,
      "new_path": "packages/pigeon/test/dart_generator_test.dart"
    }
  ]
}
