readFromFilePath function

Future<String> readFromFilePath(
  1. String source
)

Reads a file from a operation systems File Path/

Implementation

Future<String> readFromFilePath(String source) async {
  try {
    var file = File(source);
    return await file.readAsString();
  } on Exception {
    return Future.error(UnsupportedSourceException());
  }
}