dispose method
Libera recursos
Implementation
Future<void> dispose() async {
try {
// Flush data before closing
await flush();
await _eventsBox?.close();
await _internalStateBox?.close();
await _performanceBox?.close();
// Close stream controller
await _storageEventsController.close();
_isInitialized = false;
ObslyLogger.debug('Storage disposed');
} catch (e) {
ObslyLogger.error('Error disposing storage: $e');
}
}