getFileContents function

String getFileContents(
  1. String filePath
)

Returns the contents of a file as a string.

Implementation

String getFileContents(String filePath) {
  var fileContents = File(filePath).readAsStringSync();
  return fileContents;
}