Skip to content

Instantly share code, notes, and snippets.

@LethalMaus
Created January 15, 2026 22:07
Show Gist options
  • Select an option

  • Save LethalMaus/1fabf17d5c5ff98f8dc3910a353cc9df to your computer and use it in GitHub Desktop.

Select an option

Save LethalMaus/1fabf17d5c5ff98f8dc3910a353cc9df to your computer and use it in GitHub Desktop.
EmergencyTakeoverButton.kt
if (!connection.connected || showEmergency) {
Chip(
modifier = Modifier.fillMaxWidth(),
colors = ChipDefaults.secondaryChipColors(),
onClick = { manager.takeControl(emergency = true) },
label = {
Box(
modifier = Modifier.fillMaxWidth(),
contentAlignment = Alignment.Center
) {
Text("Emergency takeover", textAlign = TextAlign.Center)
}
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment