diff --git a/examples/material_gallery/test/example_code_parser_test.dart b/examples/material_gallery/test/example_code_parser_test.dart index 913d4e3812..84961ab2b4 100644 --- a/examples/material_gallery/test/example_code_parser_test.dart +++ b/examples/material_gallery/test/example_code_parser_test.dart @@ -40,8 +40,9 @@ class TestAssetBundle extends AssetBundle { ImageResource loadImage(String key) => null; @override - Future loadString(String key) {if (key == 'lib/gallery/example_code.dart') - return (new Completer()..complete(testCodeFile)).future; + Future loadString(String key) { + if (key == 'lib/gallery/example_code.dart') + return new Future.value(testCodeFile); return null; }