close method
Ensures that event bus subscriptions are properly cleaned up when the Cubit is closed.
Implementation
@override
Future<void> close() async {
_stateStreamSubscription?.cancel();
_eventBusStreamSubscription?.cancel();
// Call the superclass close method to handle additional cleanup.
super.close();
}