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
b5b1cbeb
Unverified
Commit
b5b1cbeb
authored
Jul 27, 2018
by
Jonah Williams
Committed by
GitHub
Jul 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle case where image is null as well (#19797)
parent
e6fa45d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
image_cache.dart
packages/flutter/lib/src/painting/image_cache.dart
+1
-1
No files found.
packages/flutter/lib/src/painting/image_cache.dart
View file @
b5b1cbeb
...
@@ -143,7 +143,7 @@ class ImageCache {
...
@@ -143,7 +143,7 @@ class ImageCache {
result
=
loader
();
result
=
loader
();
void
listener
(
ImageInfo
info
,
bool
syncCall
)
{
void
listener
(
ImageInfo
info
,
bool
syncCall
)
{
// Images that fail to load don't contribute to cache size.
// Images that fail to load don't contribute to cache size.
final
int
imageSize
=
info
.
image
==
null
?
0
:
info
.
image
.
height
*
info
.
image
.
width
*
4
;
final
int
imageSize
=
info
?
.
image
==
null
?
0
:
info
.
image
.
height
*
info
.
image
.
width
*
4
;
final
_CachedImage
image
=
new
_CachedImage
(
result
,
imageSize
);
final
_CachedImage
image
=
new
_CachedImage
(
result
,
imageSize
);
// If the image is bigger than the maximum cache size, and the cache size
// If the image is bigger than the maximum cache size, and the cache size
// is not zero, then increase the cache size to the size of the image plus
// is not zero, then increase the cache size to the size of the image plus
...
...
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