The url_launcher plugin
The url_launcher plugin acts as a bridge to the platform-native link handlers so that we do not need to worry about platform-level details.
The usage of the plugin is reduced to few functions, launch(url) being the main one. The launch function retrieves a URL as an argument and takes care of the launching that's particular to each system.
In Android, it will build an intent for the system to handle through a browser app (or display a webview for web schemes if forceWebView is set to true). In iOS, web-scheme URLs are handled by default in a view controller owned by the app.
We integrate the plugin in the FavorCardItem handleLinkClick function, where we simply call the launch(url) function, passing the URL that comes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access