onExport property

LogExportCallback? onExport
final

Log export with the page's current filter, for example to send to support; without it there is no export button. How to deliver the result (clipboard, share, file) is up to the app:

onExport: (context, filter) async {
  final text = StringBuffer();
  await exportLog(reader, text, filter: filter);
  await Clipboard.setData(ClipboardData(text: '$text'));
},

A failure is shown on the page (LogViewerStrings.exportFailed) and goes to LogViewerController.diagnostics.

Implementation

final LogExportCallback? onExport;