Index: sdk/lib/vmservice/asset.dart |
diff --git a/sdk/lib/vmservice/asset.dart b/sdk/lib/vmservice/asset.dart |
index 8155e8a8cea7558bdcfa882f04265bfbf81d0cdf..b8f6c207f94dd431d232f2c2f5c4d0fd617afb24 100644 |
--- a/sdk/lib/vmservice/asset.dart |
+++ b/sdk/lib/vmservice/asset.dart |
@@ -59,6 +59,17 @@ class Asset { |
String toString() => '$name ($mimeType)'; |
} |
+HashMap<String, Asset> _assets; |
+HashMap<String, Asset> get assets { |
+ if (_assets == null) { |
+ try { |
+ _assets = Asset.request(); |
+ } catch (e) { |
+ print('Could not load Observatory assets: $e'); |
+ } |
+ } |
+ return _assets; |
+} |
class _ByteStream { |
final Uint8List bytes; |