catFile function

Future<String> catFile(
  1. File file, [
  2. Encoding encoding = utf8
])

Loads a file as String using encoding.

encoding If null uses UTF-8.

Implementation

Future<String> catFile(File file, [Encoding encoding = utf8]) async {
  return file.readAsString(encoding: encoding);
}