-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Slight clarification in the ImageCache docs #33195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It was easy to miss the reference to the top-level `imageCache` property before. This calls out the property a little more explicitly.
| /// subclasses automatically handle the caching of images. | ||
| /// | ||
| /// A shared instance of this cache is retained by [PaintingBinding] and can be | ||
| /// obtained via the [imageCache] top-level property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be [PaintingBinding.imageCache] so it links directly there? As fas as I can tell, The ImageCache class does not have an imageCache property, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a top-level property -- https://api.flutter.dev/flutter/painting/imageCache.html
It was actually linked in the docs before too, but the way it was structured, I missed the link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are of course right, I think I was confused by the mentioning of PaintingBinding in the previous sentence and assumed you must mean the imageCache property on that thing.
Maybe you could clarify that [imageCache] is a top-level property in the painting library (https://master-api.flutter.dev/flutter/painting/painting-library.html). But it's also fine as is as the link will actually go to the right thing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| /// subclasses automatically handle the caching of images. | ||
| /// | ||
| /// A shared instance of this cache is retained by [PaintingBinding] and can be | ||
| /// obtained via the [imageCache] top-level property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are of course right, I think I was confused by the mentioning of PaintingBinding in the previous sentence and assumed you must mean the imageCache property on that thing.
Maybe you could clarify that [imageCache] is a top-level property in the painting library (https://master-api.flutter.dev/flutter/painting/painting-library.html). But it's also fine as is as the link will actually go to the right thing...
Description
It was easy to miss the reference to the top-level
imageCacheproperty before. This calls out the property a little more
explicitly.
Tests
N/A
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?