Skip to content

CupertinoDialogAction

Examples#

See these.

CupertinoDialogAction #

Bases: Control

A dialog action button.

Typically used as a child of CupertinoAlertDialog.actions.

RAISES DESCRIPTION
AssertionError

If content is neither a string nor a visible Control.

content #

content: StrOrControl

The content of this action button.

default #

default: bool = False

Whether this action is a default action. In this case, the button will have bold text.

Info

Multiple actions can have this property set to True in a CupertinoAlertDialog.

destructive #

destructive: bool = False

If set to True, this button's text color will be red.

Typically used for actions that destroy objects, such as an delete that deletes an email etc.

on_click #

on_click: (
    ControlEventHandler[CupertinoDialogAction] | None
) = None

Called when a user clicks this button.

text_style #

text_style: TextStyle | None = None

The text style to use for text in this button.

Can be useful when content is a string.

before_update #

before_update()