shareLog method
Implementation
Future<LogStatus> shareLog() async {
try {
if (logFile != null && await logFile!.exists()) {
XFile xfile = XFile(logFile!.path);
await Share.shareXFiles([xfile], subject: "Log Service Errors");
return LogStatus(status: true, msg: "File Shared Successfully");
} else {
return LogStatus(status: false, msg: "File Not Found!");
}
} catch (e) {
return LogStatus(status: false, msg: "$e");
}
}