collectWithLifecycle
Observe a Flow and execute an action when the value is changed.
Parameters
action
The action to be executed when the value is changed.
Observe a Flow and execute an action when the value is changed.
The action to be executed when the value is changed.