readAsString abstract method

Future<String> readAsString(
  1. Uri uri, {
  2. Encoding? encoding,
})

Reads the file located by uri as a String.

The file bytes are decoded using encoding, if provided.

If encoding is omitted, the default for the file: scheme is UTF-8. For http, https and data URIs, the Content-Type header's charset is used, if available and recognized by Encoding.getByName, otherwise it defaults to Latin-1 for http and https and to ASCII for data URIs.

Implementation

Future<String> readAsString(Uri uri, {Encoding? encoding});