AndroidDev, Android App Development, Android, Jetpack, Jetpack Compose.
or Disconnected. Providing viewModelScope will bind Flow to the life-cycle of viewModelScope. WhileSubscribed is used to cancel the upstream automatically when there are no collectors collecting the flow. WhileSubscribed(5000) will wait for 5 more minutes after the last collector before closing the