get method
The file at path as UTF-8 text.
Implementation
Future<String> get(String path) async {
final Uint8List data = await bytes(path);
try {
return utf8.decode(data);
} on FormatException catch (error) {
throw DiskException(
'The file is not UTF-8 text',
disk: name,
path: path,
cause: error,
);
}
}