fetchFile static method
Returns the file that is found with the given filePath
.
Throws FileSystemException if the file does not exist.
Implementation
static Future<File> fetchFile(String filePath) async {
if (File(filePath).existsSync()) {
return File(filePath);
} else {
throw const FileSystemException("File does not exist!");
}
}