observeState

Add a state observer for StateObserver.

Parameters

owner

The LifecycleOwner which controls the observer.

listener

The observer listener.