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
603e1efb
Commit
603e1efb
authored
Oct 01, 2015
by
Collin Jackson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1434 from collinjackson/decode_lists
Support for decoding images in lists
parents
ab8aeff8
a995092c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
spinning_image.dart
examples/raw/spinning_image.dart
+1
-1
asset_bundle.dart
packages/flutter/lib/src/services/asset_bundle.dart
+1
-1
image_cache.dart
packages/flutter/lib/src/services/image_cache.dart
+1
-1
No files found.
examples/raw/spinning_image.dart
View file @
603e1efb
...
@@ -11,7 +11,7 @@ import 'package:sky/services.dart';
...
@@ -11,7 +11,7 @@ import 'package:sky/services.dart';
double
timeBase
=
null
;
double
timeBase
=
null
;
sky
.
Image
image
=
null
;
sky
.
Image
image
=
null
;
String
url1
=
"https://
www.dartlang.org/logo
s/dart-logo.png"
;
String
url1
=
"https://
raw.githubusercontent.com/dart-lang/logos/master/logos_and_wordmark
s/dart-logo.png"
;
String
url2
=
"http://i2.kym-cdn.com/photos/images/facebook/000/581/296/c09.jpg"
;
String
url2
=
"http://i2.kym-cdn.com/photos/images/facebook/000/581/296/c09.jpg"
;
sky
.
Picture
paint
(
sky
.
Rect
paintBounds
,
double
delta
)
{
sky
.
Picture
paint
(
sky
.
Rect
paintBounds
,
double
delta
)
{
...
...
packages/flutter/lib/src/services/asset_bundle.dart
View file @
603e1efb
...
@@ -70,7 +70,7 @@ class MojoAssetBundle extends AssetBundle {
...
@@ -70,7 +70,7 @@ class MojoAssetBundle extends AssetBundle {
return
_imageCache
.
putIfAbsent
(
key
,
()
{
return
_imageCache
.
putIfAbsent
(
key
,
()
{
Completer
<
sky
.
Image
>
completer
=
new
Completer
<
sky
.
Image
>();
Completer
<
sky
.
Image
>
completer
=
new
Completer
<
sky
.
Image
>();
load
(
key
).
then
((
assetData
)
{
load
(
key
).
then
((
assetData
)
{
new
sky
.
ImageDecoder
(
assetData
.
handle
.
h
,
completer
.
complete
);
new
sky
.
ImageDecoder
.
consume
(
assetData
.
handle
.
h
,
completer
.
complete
);
});
});
return
new
ImageResource
(
completer
.
future
);
return
new
ImageResource
(
completer
.
future
);
});
});
...
...
packages/flutter/lib/src/services/image_cache.dart
View file @
603e1efb
...
@@ -23,7 +23,7 @@ class _ImageCache {
...
@@ -23,7 +23,7 @@ class _ImageCache {
print
(
"Failed (
${response.statusCode}
) to load image
${url}
"
);
print
(
"Failed (
${response.statusCode}
) to load image
${url}
"
);
completer
.
complete
(
null
);
completer
.
complete
(
null
);
}
else
{
}
else
{
new
sky
.
ImageDecoder
(
response
.
body
.
handle
.
h
,
completer
.
complete
);
new
sky
.
ImageDecoder
.
consume
(
response
.
body
.
handle
.
h
,
completer
.
complete
);
}
}
});
});
return
new
ImageResource
(
completer
.
future
);
return
new
ImageResource
(
completer
.
future
);
...
...
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