readAsString method

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

Reads the contents of the file as String, using the given encoding.

Implementation

Future<String> readAsString({Encoding encoding = utf8}) {
  return encoding.decoder.bind(data).join();
}