Skip to main content

ShareText

Opens the platform share sheet with text when the control is activated.

Equivalent to Share.share_text, but performed by the client inside the user's gesture, which is the only time a browser permits navigator.share.

The share result is not reported back - use Share.share_text if you need it, keeping in mind that it does not work on the web on iOS.

Example
ft.Button(
"Share",
action=ft.ShareText("Check out Flet", subject="Flet"),
)

Inherits: ClientAction

Properties

  • subject - Subject used by targets that support one, such as email.
  • text - The text to share.
  • title - Title shown in the share sheet.

Properties

subjectclass-attributeinstance-attribute

subject: str | None = action_field(None)

Subject used by targets that support one, such as email.

textclass-attributeinstance-attribute

text: str = action_field()

The text to share.

titleclass-attributeinstance-attribute

title: str | None = action_field(None)

Title shown in the share sheet.