readFile static method

Future<String> readFile(
  1. String path
)

从文件中读取内容。

Implementation

static Future<String> readFile(String path) async {
  File file = File(path);
  return file.readAsString();
}