avoid returning null for Future (#23784)
This commit is contained in:
committed by
GitHub
parent
202b045b50
commit
344ebe02ff
@@ -41,12 +41,12 @@ test 1 1
|
||||
|
||||
class TestAssetBundle extends AssetBundle {
|
||||
@override
|
||||
Future<ByteData> load(String key) => null;
|
||||
Future<ByteData> load(String key) async => null;
|
||||
|
||||
@override
|
||||
Future<String> loadString(String key, { bool cache = true }) {
|
||||
Future<String> loadString(String key, { bool cache = true }) async {
|
||||
if (key == 'lib/gallery/example_code.dart')
|
||||
return Future<String>.value(testCodeFile);
|
||||
return testCodeFile;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user