readAsStringAsync static method
读取文字文件
Implementation
static Future<String> readAsStringAsync(String path) async {
// 增加通用处理 - 如果文件不存在则报错
if (await existsAsync(path)) {
return File(path).readAsString();
} else {
throw FileIOException('路径不存在: $path');
}
}