Integrating url_launcher in Flutter Apps
The mobile app development world has moved from fast to ‘impatiently fast’. One essential aspect of faster user interaction is the ability to navigate to external websites or open other apps directly from within your Flutter application.
This is where the url_launcher plugin for Flutter comes into play. This plugin allows you to open URLs in the default web browser of the device. It also allows for opening URLs that launch other apps installed on the device such as emails or social media apps.
Installing URL Launcher in Flutter
Installation can be done in a whiff by following the code given below:
Terminal Command
flutter pub add url_launcher
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
url_launcher: x.y.z.
Supported URL Schemes
url_launcher supports various URL schemes. They are essentially prefixes or protocols that help define how a URL should be handled by Android, iOS or any operating system or apps in general. Common URL Schemes supported by url_launcher include HTTP, HTTPS, mailto, SMS, tel, App Schemes and Custom Schemes.
