dispose method
Clean up resources including temporary storage
Implementation
Future<void> dispose() async {
try {
if (_tempDir != null && _tempDir!.existsSync()) {
_logger.info('Cleaning up temporary storage at: ${_tempDir!.path}');
await _tempDir!.delete(recursive: true);
_tempDir = null;
}
} catch (e) {
_logger.warning('Failed to clean up temporary storage: $e');
}
}