readAsStringSync abstract method

String readAsStringSync({
  1. Encoding encoding = utf8,
})

Reads the entire asset synchronously as a string.

Returns the asset contents as a String.

The optional encoding parameter specifies the encoding to use when reading the file. It defaults to utf8.

Implementation

String readAsStringSync({Encoding encoding = utf8});