Open URL
Most mobile applications provide links that take users to a different section of the same app or to external websites. Open URL helps us in achieving this in our Flutter application.
How to Open URL
Step 1:
Select the screen from the screen list on which you want to set up open URL.
Step 2:
On a click of a particular icon or widget, on the onClick
property select Open URL
from the listed actions.
Now, add the URL which you want to open on the click of it.
At this stage, you have successfully open URL to your application.
Generated code snippet
onTap() async {
var url = 'https://www.dhiwise.com/';
if (!await launch(url)) {
throw 'Could not launch https://www.dhiwise.com/';
}
}
Got a question? Ask here.