From bc7bc940836f1f834699625426795fd6f07c18ec Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Thu, 23 May 2019 10:29:07 -0700 Subject: [PATCH] Slight clarification in the ImageCache docs (#33195) It was easy to miss the reference to the top-level `imageCache` property before. This calls out the property a little more explicitly. --- packages/flutter/lib/src/painting/image_cache.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/painting/image_cache.dart b/packages/flutter/lib/src/painting/image_cache.dart index 0a0b1a7180..66f403368d 100644 --- a/packages/flutter/lib/src/painting/image_cache.dart +++ b/packages/flutter/lib/src/painting/image_cache.dart @@ -7,7 +7,7 @@ import 'image_stream.dart'; const int _kDefaultSize = 1000; const int _kDefaultSizeBytes = 100 << 20; // 100 MiB -/// Class for the [imageCache] object. +/// Class for caching images. /// /// Implements a least-recently-used cache of up to 1000 images, and up to 100 /// MB. The maximum size can be adjusted using [maximumSize] and @@ -25,6 +25,9 @@ const int _kDefaultSizeBytes = 100 << 20; // 100 MiB /// /// Generally this class is not used directly. The [ImageProvider] class and its /// 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 in the [painting] library. class ImageCache { final Map _pendingImages = {}; final Map _cache = {};