From 9aeeb15849fce717fafff0a49b368a1101a7eb2a Mon Sep 17 00:00:00 2001 From: Viktor Lidholt Date: Wed, 20 Apr 2016 12:45:54 -0700 Subject: [PATCH] Minor fixes to code parser test in gallery (#3439) --- examples/material_gallery/test/example_code_parser_test.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; }