rememberConnectivityState

fun rememberConnectivityState(connectivity: Connectivity, scope: CoroutineScope = rememberCoroutineScope()): ConnectivityState

Create and remember a ConnectivityState instance.

Return

A ConnectivityState instance.

Parameters

connectivity

The Connectivity instance to use for monitoring the network status.

scope

The CoroutineScope in which to launch the network status monitoring coroutine.