OpenUrl
Opens a URL when the control is activated.
Equivalent to UrlLauncher.launch_url, but performed by the
client inside the user's gesture, so that opening a new tab is not blocked as
an unsolicited popup.
Example
ft.Button(
"Open flet.dev",
action=ft.OpenUrl("https://flet.dev", target=ft.UrlTarget.BLANK),
)
Inherits: ClientAction
Properties
target- Where to open the URL, for exampleUrlTarget.BLANKfor a new tab.url- The URL to open.
Properties
targetclass-attributeinstance-attribute
target: UrlTarget | str | None = action_field(None)Where to open the URL, for example UrlTarget.BLANK for a new tab.
Web-only; ignored on other platforms.