dispose method
Close Hive boxes when service is disposed.
Implementation
Future<void> dispose() async {
try {
if (_movieBox != null && _movieBox!.isOpen) {
await _movieBox!.close();
}
if (_timestampBox != null && _timestampBox!.isOpen) {
await _timestampBox!.close();
}
_isInitialized = false;
} catch (e) {
debugPrint('Error disposing Hive service: $e');
}
}