Skip to content

Instantly share code, notes, and snippets.

@saqib-github-commits
Created May 8, 2023 21:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save saqib-github-commits/f6f62c78714c50e3c2bea9667cd86edc to your computer and use it in GitHub Desktop.
val networkStatus: StateFlow<NetworkStatus> = networkConnectivityService.networkStatus.stateIn(
initialValue = NetworkStatus.Unknown,
scope = viewModelScope,
started = WhileSubscribed(5000)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment