readAsString method
Reads the whole content as text, decoded with encoding (UTF-8
unless given).
final text = await resource.readAsString();
Implementation
@override
Future<String> readAsString({Encoding encoding = utf8}) async =>
encoding.decode(await readAsBytes());