readAssetFileAsString static method
从 assets 读取文件内容
Implementation
static Future<String> readAssetFileAsString(String assetPath, {bool catchException = true}) async {
try {
return await rootBundle.loadString(assetPath);
} catch (e) {
if (catchException) {
return '';
} else {
rethrow;
}
}
}