The Launch URL Action lets you specify a URL that will be opened using an app supporting it. If there is more than one app that can handle the specified URL, the user will be presented with a dialog from where one of the apps can be selected.
This page will describe some common URL schemes that you can define using FlutterFlow.
You can trigger the Launch URL Action from any tappable component on FlutterFlow, typically they are defined as an Action of a Button or an IconButton widget.
Click + Add Action and select On Tap from the dropdown menu.
Select the Action Type as Launch URL.
In the URL Value Type property, select either Specify URL (to add the URL as a String) or From Variable (to use the value stored in a String variable).
If using Specify URL, enter the URL that you want to use in the URL field. For example, you can enter "https://flutter.dev" to open the Flutter webpage.
If using From Variable, select the Source from which to fetch the URL value. You can also specify a Default Value that will be used when the variable value is not set (i.e. null).
(Optional) You can use the Set Conditional Execution property and define a condition if you want the action to run only if that condition satisfies.
The following are some common URL schemes that can be handled by an external app present on the user's device.
Open a webpage
This URL scheme for loading up a webpage can be defined in this format:
http:<webpage URL link>
https:<webpage URL link>
Use a phone number
This URL scheme helps to handle phone numbers inside your app. Using this, you can easily initiate a phone call to the provided phone number from the user's device.
Compose a text message
This URL scheme lets you redirect users from your app to compose and send an SMS message to a specified phone number.
Create an email
This URL scheme helps you to launch an email app on the user's device. It allows you to pass the email to, subject, and body to the app so that you have these fields prefilled with details as the email app is opened.