把文件内容读取到字符串变量中
Use the File readAsString() method to read a file as a string.
import 'dart:io';
main() async {
var contents = await new File('file.txt').readAsString();
print(contents);
}
Use the File readAsString() method to read a file as a string.
import 'dart:io';
main() async {
var contents = await new File('file.txt').readAsString();
print(contents);
}