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 toTrue, 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 = FalseWhether 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 = FalseIf 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.
Events
on_clickclass-attributeinstance-attribute
on_click: Optional[ControlEventHandler[CupertinoDialogAction]] = NoneCalled when a user clicks this button.