Unverified Commit 26f9d734 authored by Juyeong Lee's avatar Juyeong Lee Committed by GitHub

Update image docs that Image.file() cashes file (#62301)

parent 234d8fac
......@@ -837,6 +837,9 @@ abstract class NetworkImage extends ImageProvider<NetworkImage> {
/// Decodes the given [File] object as an image, associating it with the given
/// scale.
///
/// The provider does not monitor the file for changes. If you expect the
/// underlying data to change, you should call the [evict] method.
///
/// See also:
///
/// * [Image.file] for a shorthand of an [Image] widget backed by [FileImage].
......
......@@ -436,6 +436,15 @@ class Image extends StatefulWidget {
/// will be rendered to the constraints of the layout or [width] and [height]
/// regardless of these parameters. These parameters are primarily intended
/// to reduce the memory usage of [ImageCache].
///
/// Loading an image from a file creates an in memory copy of the file,
/// which is retained in the [ImageCache]. The underlying file is not
/// monitored for changes. If it does change, the application should evict
/// the entry from the [ImageCache].
///
/// See also:
///
/// * [FileImage] provider for evicting the underlying file easily.
Image.file(
File file, {
Key key,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment