Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Unified Diff: sky/sdk/example/game/lib/image_map.dart

Issue 1216303005: Convert image_cache to using Futures rather than callbacks (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix _loadComplete Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/sdk/example/raw/spinning_image.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/game/lib/image_map.dart
diff --git a/sky/sdk/example/game/lib/image_map.dart b/sky/sdk/example/game/lib/image_map.dart
index 577df2a4e0bf10dbd933f14da08ae7171f02a56c..7f0185c8fb0dc1ae9f7df7dc0cd7d3929f05cf97 100644
--- a/sky/sdk/example/game/lib/image_map.dart
+++ b/sky/sdk/example/game/lib/image_map.dart
@@ -18,7 +18,7 @@ class ImageMap {
}
void _addURL(String url) {
- image_cache.load(url, (Image image) {
+ image_cache.load(url).then((Image image) {
// Store reference to image
_images[url] = image;
@@ -34,4 +34,4 @@ class ImageMap {
Image getImage(String url) => _images[url];
Image operator [](String url) => _images[url];
-}
+}
« no previous file with comments | « no previous file | sky/sdk/example/raw/spinning_image.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698