)]}'
{
  "commit": "1ca93dec90a5d30ce22251a6df26939e4cfb365f",
  "tree": "4825c4abeed81e1bfccbe5dba39f2b57868c238e",
  "parents": [
    "05b71be8bc4e751a9867797baad71df0d0f9aa51"
  ],
  "author": {
    "name": "Huy",
    "email": "huy@nevercode.io",
    "time": "Mon May 12 15:48:22 2025 +0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon May 12 08:48:22 2025 +0000"
  },
  "message": "Fix Selected DropdownMenuItem isn\u0027t highlighted on mobile (#167874)\n\nFix https://github.com/flutter/flutter/issues/70294\n\n### Description\n\nThe bug is about the previously selected DropdownMenuItem isn\u0027t\nhighlighted on mobile while it works on Web and desktop. The reason is\nthat `FocusManager.instance.highlightMode` has fallen to\n`FocusHighlightMode.touch` on mobile by default (or touch device without\nmouse in general):\n\n\nhttps://github.com/flutter/flutter/blob/6f220d3ec0948a4def1622de805fabda9855338d/packages/flutter/lib/src/material/dropdown.dart#L172-L175\n\n\nhttps://github.com/flutter/flutter/blob/7d56be4c8de814022357633179a816b51ffca4b8/packages/flutter/lib/src/widgets/focus_manager.dart#L2335-L2353\n\n\nhttps://github.com/flutter/flutter/blob/7d56be4c8de814022357633179a816b51ffca4b8/packages/flutter/lib/src/widgets/focus_manager.dart#L1741-L1748\n\nWe actually can work around this by setting\n`FocusManager.instance.highlightStrategy` to\n`FocusHighlightStrategy.alwaysTraditional`, see\nhttps://github.com/flutter/flutter/pull/70442#issuecomment-727036571.\nNevertheless, this approach will may affect the entire scope of the app,\npotentially resulting in unforeseen behavior for other widgets. \n\nIn this PR, I propose a straightforward solution that utilizes an\nancestor widget (Ink) to manage the color state corresponding to\n`InkWell.overlayColor`.\n\n### Demo the fix\n\n\nhttps://github.com/user-attachments/assets/b6476732-716c-4f39-ab82-7ab5accb7182\n\n\n## Pre-launch Checklist\n\n- [x] I read the [Contributor Guide] and followed the process outlined\nthere for submitting PRs.\n- [x] I read the [Tree Hygiene] wiki page, which explains my\nresponsibilities.\n- [x] I read and followed the [Flutter Style Guide], including [Features\nwe expect every widget to implement].\n- [x] I signed the [CLA].\n- [x] I listed at least one issue that this PR fixes in the description\nabove.\n- [x] I updated/added relevant documentation (doc comments with `///`).\n- [x] I added new tests to check the change I am making, or this PR is\n[test-exempt].\n- [x] I followed the [breaking change policy] and added [Data Driven\nFixes] where supported.\n- [x] All existing and new tests are passing.\n\nIf you need help, consider asking for advice on the #hackers-new channel\non [Discord].\n\n\u003c!-- Links --\u003e\n[Contributor Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview\n[Tree Hygiene]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md\n[test-exempt]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests\n[Flutter Style Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md\n[Features we expect every widget to implement]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement\n[CLA]: https://cla.developers.google.com/\n[flutter/tests]: https://github.com/flutter/tests\n[breaking change policy]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes\n[Discord]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md\n[Data Driven Fixes]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md\n\nSigned-off-by: huycozy \u003chuy@nevercode.io\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "28c93becb046c7b07b8536b2e8da40480adc0f11",
      "old_mode": 33188,
      "old_path": "packages/flutter/lib/src/material/dropdown.dart",
      "new_id": "611802afc8592f3901c880468084d93df4c0362d",
      "new_mode": 33188,
      "new_path": "packages/flutter/lib/src/material/dropdown.dart"
    },
    {
      "type": "modify",
      "old_id": "bf4545878f3b951e21f3e96be0f71004c5d2bf80",
      "old_mode": 33188,
      "old_path": "packages/flutter/test/material/dropdown_test.dart",
      "new_id": "88bc26938151b44124298ee86bab543e1c3d29a4",
      "new_mode": 33188,
      "new_path": "packages/flutter/test/material/dropdown_test.dart"
    }
  ]
}
