DevToolsState

@Serializable
data class DevToolsState(val connectionState: ConnectionState = ConnectionState.DISCONNECTED, val currentServerUrl: String? = null, val errorMessage: String? = null) : ModuleState(source)

State representing the current DevTools connection status.

This state can be observed to show connection status in the UI:

@Composable
fun ConnectionIndicator() {
val devToolsState by selectState<DevToolsState>().collectAsState()

when (devToolsState.connectionState) {
ConnectionState.CONNECTED -> Icon(Icons.Check, "Connected")
ConnectionState.CONNECTING -> CircularProgressIndicator()
ConnectionState.DISCONNECTED -> Icon(Icons.Close, "Disconnected")
ConnectionState.ERROR -> Icon(Icons.Error, "Error")
}
}

Constructors

Link copied to clipboard
constructor(connectionState: ConnectionState = ConnectionState.DISCONNECTED, currentServerUrl: String? = null, errorMessage: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val errorMessage: String? = null