String readAsStringSync(
{Encoding encoding: UTF8}
)

Synchronously read the entire file contents as a string using the given Encoding.

Throws a FileSystemException if the operation fails.

Source

/**
 * Synchronously read the entire file contents as a string using the
 * given [Encoding].
 *
 * Throws a [FileSystemException] if the operation fails.
 */
String readAsStringSync({Encoding encoding: UTF8});