How to launch Urls in Flutter
Launching mail-, phone-, sms- or web-urls with the url-launcher in Flutter
Hello and welcome to my post about How to launch Urls in Flutter. Through regular content, applicable examples, and best practices, I’ll teach you how to use Flutter and Dart a little bit more every week. If you want to see the first post of this series head over to How to validate Emails in Flutter.
Url-launcher
Your app isn’t always everything. It happens that you provide an external url that links to a website. Or you provide an email address or even a phone number in the contact form, to reach the support. For all these external links, it would be nice to open them directly through the app using your browser, phone or email app. This is possible by implementing the url-launcher package in your flutter app.
The purpose
The Url-launcher package has the purpose to open external links. This includes website urls, as well as email, phone and sms links. They will then be executed by your smartphone (or other electronic device) in the corresponding app.
Package scope
The most important function provided by the package is the launch function. After you have installed the package and imported it into your class you can use the function…