rememberConnectivityState

fun rememberConnectivityState(options: ConnectivityOptions = remember { ConnectivityOptions() }, scope: CoroutineScope = rememberCoroutineScope()): ConnectivityState

Create and remember a ConnectivityState instance for Android and iOS platforms.

Return

A ConnectivityState instance.

Parameters

options

The ConnectivityOptions to use for configuring the network status monitoring.

scope

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


fun rememberConnectivityState(scope: CoroutineScope = rememberCoroutineScope(), block: ConnectivityOptions.Builder.() -> Unit): ConnectivityState

Create and remember a ConnectivityState instance for Android and iOS platforms.

Return

A ConnectivityState instance.

Parameters

scope

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

block

A lambda function to configure the ConnectivityOptions for the network status monitoring.