readText method

Future<String> readText(
  1. {Encoding encoding = utf8}
)

Returns the data as text contents, decoded with the given encoding (defaults is UTF-8).

Implementation

Future<String> readText({Encoding encoding = utf8}) async =>
    (await read()).transform(encoding.decoder).join();