Updates the state to the provided state.
emit does nothing if the instance has been closed or if the
state being emitted is equal to the current state.
Adds a subscription to the Stream<State>.
Returns a StreamSubscription which handles events from
the Stream<State> using the provided onData, onError and onDone
handlers.
Called whenever a change occurs with the given change.
A change occurs when a new state is emitted.
onChange is called before the state of the cubit is updated.
onChange is a great spot to add logging/analytics for a specific cubit.