Minor fixes to code parser test in gallery (#3439)

This commit is contained in:
Viktor Lidholt
2016-04-20 12:45:54 -07:00
parent 731c5903c2
commit 9aeeb15849

View File

@@ -40,8 +40,9 @@ class TestAssetBundle extends AssetBundle {
ImageResource loadImage(String key) => null;
@override
Future<String> loadString(String key) {if (key == 'lib/gallery/example_code.dart')
return (new Completer<String>()..complete(testCodeFile)).future;
Future<String> loadString(String key) {
if (key == 'lib/gallery/example_code.dart')
return new Future<String>.value(testCodeFile);
return null;
}