readFileAsString static method
读取文件内容
Implementation
static Future<String> readFileAsString(String filePath, {bool catchException = true}) async {
try {
final file = File(filePath);
return await file.readAsString();
} catch (e) {
if (catchException) {
return '';
} else {
rethrow;
}
}
}