getNetworkLogs method
Reads all network logs from persistent storage.
The logs are read from a file named network_logs.jsonl within the
application support directory. The logs are read in JSON Lines format.
The logs are read asynchronously in a separate isolate to avoid blocking the main isolate.
The logs are returned as a list of SimpleOverlayNetworkLog objects.
Implementation
Future<List<SimpleOverlayNetworkLog>> getNetworkLogs() async {
final dir = await getApplicationSupportDirectory();
final rawLogs = await Isolate.run(
() => SimpleOverlayIsolateLogWriter.readLogs(dir.path, 'network'));
return rawLogs.map((e) => SimpleOverlayNetworkLog.fromJson(e)).toList();
}