viewFile static method
function file view
Implementation
static viewFile(
{required FileData fileData, Function(FileData fileData)? onView}) {
try {
if (!Files._isNullOREmpty(fileData.path)) {
if (onView != null) {
onView(fileData);
} else {
if (Files.isHttpPath(fileData.path)) {
Open.browser(url: fileData.path);
} else {
Open.localFile(filePath: fileData.path);
}
}
} else {
dev.log(Files._fileNotFound);
}
} catch (e) {
dev.log(Files._fileCouldNotLoad);
}
}