RecoveryCard

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

A reusable recovery card: a message box plus one full-width corrective 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

tone

whether this reads as an error or as an offer; see RecoveryTone.

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.