Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
26f9d734
Unverified
Commit
26f9d734
authored
Jul 30, 2020
by
Juyeong Lee
Committed by
GitHub
Jul 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update image docs that Image.file() cashes file (#62301)
parent
234d8fac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
image_provider.dart
packages/flutter/lib/src/painting/image_provider.dart
+3
-0
image.dart
packages/flutter/lib/src/widgets/image.dart
+9
-0
No files found.
packages/flutter/lib/src/painting/image_provider.dart
View file @
26f9d734
...
...
@@ -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].
...
...
packages/flutter/lib/src/widgets/image.dart
View file @
26f9d734
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment