Skip to main content

CupertinoDialogAction

Examples

See these.

A dialog action button.

Typically used as a child of flet.CupertinoAlertDialog.actions.

Inherits: Control

Properties

  • content - The content of this action button.
  • default - Whether this action is a default action.
  • destructive - If set to True, this button's text color will be red.
  • text_style - The text style to use for text in this button.

Events

  • on_click - Called when a user clicks this button.

Properties

contentinstance-attribute

content: Annotated[StrOrControl, V.str_or_visible_control()]

The content of this action button.

Raises:

  • ValueError - If it is neither a string nor a visible Control.

defaultclass-attributeinstance-attribute

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.

destructiveclass-attributeinstance-attribute

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.

text_styleclass-attributeinstance-attribute

text_style: Optional[TextStyle] = None

The text style to use for text in this button.

Can be useful when content is a string.

Events

on_clickclass-attributeinstance-attribute

on_click: Optional[ControlEventHandler[CupertinoDialogAction]] = None

Called when a user clicks this button.