readFile static method
Reads the contents of the file at filePath
as a string.
Example:
final contents = await FileUtils.readFile('/path/to/file.txt');
Implementation
static Future<String> readFile(String filePath) async {
final File file = File(filePath);
return await file.readAsString();
}