Fix Gallery example code display initialization (#6176)
This commit is contained in:
@@ -18,7 +18,8 @@ Future<String> getExampleCode(String tag, AssetBundle bundle) async {
|
||||
}
|
||||
|
||||
Future<Null> _parseExampleCode(AssetBundle bundle) async {
|
||||
final String code = await bundle.loadString('lib/gallery/example_code.dart');
|
||||
final String code = await bundle.loadString('lib/gallery/example_code.dart') ??
|
||||
'// lib/gallery/example_code.dart not found\n';
|
||||
_exampleCode = <String, String>{};
|
||||
|
||||
final List<String> lines = code.split('\n');
|
||||
|
||||
Reference in New Issue
Block a user