)]}'
{
  "commit": "9f2f8a4841378d8791429b0f2ec935c4c708015f",
  "tree": "89f19c09217fa9fd1cf199f8923afb30116e5788",
  "parents": [
    "65a3f54d7b075817c8ee6dc69b3eba1bfc7fd5f6"
  ],
  "author": {
    "name": "Koji Wakamiya",
    "email": "koji.wakamiya@gmail.com",
    "time": "Tue Aug 18 23:19:19 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Aug 18 23:19:19 2026 +0000"
  },
  "message": "Add useLogicalPixels to ResizeImage for logical pixel cache sizing (#184549)\n\nfix https://github.com/flutter/flutter/issues/56239\n\nAdd `useLogicalPixels` to `ResizeImage` and `useLogicalCacheSize` to\n`Image.{network, file, asset, memory}` and `FadeInImage.{memoryNetwork,\nassetNetwork}` constructors.\n\nWhen `true`, the cache dimensions are interpreted as logical pixels\nrather than physical pixels, so the cached resolution follows the\nsurrounding device pixel ratio without requiring `BuildContext` at the\ncall site. Default is `false`; existing callers are unaffected.\n\n\u003cimg width\u003d\"300\" alt\u003d\"example\"\nsrc\u003d\"https://github.com/user-attachments/assets/43c10cd6-8b8e-4c87-93fd-b2be80030af2\"\n/\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eapp(lib/main.dart)\u003c/summary\u003e\n\n```dart\nimport \u0027package:flutter/material.dart\u0027;\n\nvoid main() \u003d\u003e runApp(const MyApp());\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(home: const MyWidget());\n  }\n}\n\nclass MyWidget extends StatelessWidget {\n  const MyWidget({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final dpr \u003d MediaQuery.devicePixelRatioOf(context);\n    const url \u003d\n        \u0027https://images.unsplash.com/photo-1550613097-fe6c2c321cd3\u0027\n        \u0027?auto\u003dformat\u0026fit\u003dcrop\u0026w\u003d1200\u0026q\u003d80\u0027;\n\n    return Scaffold(\n      appBar: AppBar(title: Text(\u0027devicePixelRatio: $dpr\u0027)),\n      body: Center(\n        child: Column(\n          spacing: 8,\n          children: [\n            const Text(\u0027No cacheWidth (reference)\u0027),\n            Image.network(url, width: 300, fit: BoxFit.cover),\n            const Text(\u0027cacheWidth: 300, useLogicalCacheSize: false\u0027),\n            Image.network(url, width: 300, fit: BoxFit.cover, cacheWidth: 300),\n            const Text(\u0027cacheWidth: 300, useLogicalCacheSize: true\u0027),\n            Image.network(\n              url,\n              width: 300,\n              fit: BoxFit.cover,\n              cacheWidth: 300,\n              useLogicalCacheSize: true,\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n```\n\n\u003c/details\u003e\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 [AI contribution guidelines] and understand my\nresponsibilities, or I am not using AI tools.\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**Note**: The Flutter team is currently trialing the use of [Gemini Code\nAssist for\nGitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).\nComments from the `gemini-code-assist` bot should not be taken as\nauthoritative feedback from the Flutter team. If you find its comments\nuseful you can update your code accordingly, but if you are unsure or\ndisagree with the feedback, please feel free to wait for a Flutter team\nmember\u0027s review for guidance on which automated comments should be\naddressed.\n\n\u003c!-- Links --\u003e\n[Contributor Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview\n[AI contribution guidelines]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines\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\n---------\n\nCo-authored-by: Justin McCandless \u003cjmccandless@google.com\u003e\nCo-authored-by: Victor Sanni \u003cvictorsanniay@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f168dc568d0a1443752ca2c31c6d0ac1b3e20d89",
      "old_mode": 33188,
      "old_path": "packages/flutter/lib/src/painting/image_provider.dart",
      "new_id": "11b710fe146043c628072aeeabc25dcd651f7bdb",
      "new_mode": 33188,
      "new_path": "packages/flutter/lib/src/painting/image_provider.dart"
    },
    {
      "type": "modify",
      "old_id": "b189965a5b478de9e0b7d0ea49247f3684c90111",
      "old_mode": 33188,
      "old_path": "packages/flutter/lib/src/widgets/fade_in_image.dart",
      "new_id": "18fe040b7aa446ae84c5bfc054e006a186c73e89",
      "new_mode": 33188,
      "new_path": "packages/flutter/lib/src/widgets/fade_in_image.dart"
    },
    {
      "type": "modify",
      "old_id": "b0444c17c7818b495c1b8b21f1c91ea01bfccb66",
      "old_mode": 33188,
      "old_path": "packages/flutter/lib/src/widgets/image.dart",
      "new_id": "b72bae6ebb9e84b84a390303689ab2b1ee974b31",
      "new_mode": 33188,
      "new_path": "packages/flutter/lib/src/widgets/image.dart"
    },
    {
      "type": "modify",
      "old_id": "604aecc4341d8158965459b9ee08a4c81315409d",
      "old_mode": 33188,
      "old_path": "packages/flutter/test/painting/image_provider_resize_image_test.dart",
      "new_id": "6b09e1a12d9f5224011d72e70bf42a69a27af5e2",
      "new_mode": 33188,
      "new_path": "packages/flutter/test/painting/image_provider_resize_image_test.dart"
    },
    {
      "type": "modify",
      "old_id": "db9d1fe797e516ddd5e7b258faa798790e1e2b66",
      "old_mode": 33188,
      "old_path": "packages/flutter/test/widgets/fade_in_image_test.dart",
      "new_id": "9be7429fabfd66a63a6420a9a350a83fe709b9ab",
      "new_mode": 33188,
      "new_path": "packages/flutter/test/widgets/fade_in_image_test.dart"
    },
    {
      "type": "modify",
      "old_id": "f62007d4ede8f46688805698f4099119bfa85f9b",
      "old_mode": 33188,
      "old_path": "packages/flutter/test/widgets/image_test.dart",
      "new_id": "fb0d6575981111ef664788ca56a12694ab213083",
      "new_mode": 33188,
      "new_path": "packages/flutter/test/widgets/image_test.dart"
    }
  ]
}
