destructive(_:action:)
Creates an alert button with a style that indicates a destructive action.
Declaration
static func destructive(_ label: Text, action: (() -> Void)? = {}) -> Alert.ButtonParameters
- label:
The text to display on the button.
- action:
A closure to execute when the user taps or presses the button.
Return Value
An alert button that indicates a destructive action.