RecoveryCard

fun RecoveryCard(message: String, actionLabel: String, onAction: () -> Unit, modifier: Modifier = Modifier, actionIcon: ImageVector? = null, onDismiss: () -> Unit? = null, dismissContentDescription: String? = null)(source)

A reusable error-state card: an errorContainer message box plus one full-width recovery action. Generalizes the compass warning/recovery pattern so any feature can present context plus a single corrective action (request a permission, open Bluetooth/Wi-Fi/app settings, etc.).

Parameters

message

the user-facing explanation of what is wrong.

actionLabel

the recovery button label.

onAction

invoked when the recovery button is tapped.

actionIcon

optional leading icon for the recovery button.

onDismiss

optional dismiss handler; when non-null a trailing close (×) button is shown so the user can retire a card that can't otherwise be cleared (e.g. a firmware recovery that persistently fails on an unflashable bootloader). Omit for cards that must not be dismissable, such as missing-permission prompts.

dismissContentDescription

accessibility label for the dismiss button.