LogsFileFactory class

Factory class for creating platform-appropriate log file handlers.

Automatically selects the correct implementation based on the platform:

  • Native platforms (Android, iOS, macOS, Windows, Linux): Uses file system
  • Web platform: Uses browser Blob API

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

cleanupStaleShareFiles() → Future<void>
Removes expired native share artifacts left by prior app processes.
create() → BaseLogsFile
Creates a platform-appropriate logs file handler.
createLogsFile(String logs, {String fileName = 'ispect_all_logs'}) → Future<Object>
Convenience method to create a log file directly.
saveToDevice(String logs, {String fileName = 'ispect_all_logs', String fileType = 'json'}) → Future<String>
Saves logs to device without requiring a share callback.
shareFile(String logs, {String fileName = 'ispect_all_logs', String fileType = 'json', ISpectShareCallback? onShare}) → Future<void>
Creates a log file and hands it to the platform's share mechanism.