RequireInternet

fun RequireInternet(onChanged: (Boolean) -> Unit = {}, contentWithoutInternet: @Composable () -> Unit = { InternetNotAvailableView() }, content: @Composable () -> Unit)

A wrapper for composables that require Internet.

Example:

RequireBluetooth(
onChanged = { enabled ->
// Handle Internet state change
}
) {
// Your content
}

Parameters

onChanged

A callback that will be called when the state of the internet changes.

contentWithoutInternet

A composable that will be displayed when internet is not available.

content

A composable that will be displayed when internet is available.