exportLogs method
Implementation
Future<String> exportLogs() async {
await _ensureInitialized();
final directory =
await getDownloadsDirectory() ?? await getTemporaryDirectory();
final exportFile = File(
'${directory.path}/exported_logs_${DateTime.now().millisecondsSinceEpoch}.txt');
await exportFile.writeAsString(await getLogs());
return exportFile.path;
}