shareLogsViaPlatform static method

Future<bool> shareLogsViaPlatform({
  1. bool csv = false,
})

Optional native hook. Returns false on unsupported platforms.

Implementation

static Future<bool> shareLogsViaPlatform({bool csv = false}) async {
  _ensureInitialized();
  final dynamic result = await _invokeSafely('shareLogs', <String, dynamic>{
    'content': csv ? exportLogsAsCsv() : exportLogsAsJson(),
    'mimeType': csv ? 'text/csv' : 'application/json',
    'fileName': csv ? 'security_logs.csv' : 'security_logs.json',
  });

  return result == true;
}