url_launcher
6.3.3, released 7 weeks ago by flutter.dev
Flutter plugin for launching URLs across mobile, desktop, and web platforms.
What it does
A Flutter plugin that launches URLs for web browsers, phone calls, SMS messages, and emails. It supports multiple platforms including Android, iOS, Web, Windows, macOS, and Linux.
AI-written summary of version 6.3.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to open external web links in a browser or in-app view.
- You want to trigger phone calls, SMS messages, or emails using native apps.
- You need to open local files on desktop platforms using standard file associations.
Skip it when
- You need an embedded web view widget displayed natively inside your widget tree instead of launching an external browser or overlay.
- You need complex in-app web browsing capabilities beyond basic custom tabs or browser launching.
Strengths
- Supports a wide range of platforms (Android, iOS, Web, Windows, macOS, Linux).
- Handles common URI schemes like http, https, mailto, tel, sms, and file.
- Provides flexibility for launch modes and browser configurations.
Weaknesses
- Requires platform-specific configuration such as query schemes on iOS and intent queries on Android for checking link support.
- Platform support depends on installed applications on the host device.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
Requires adding URL schemes to Info.plist on iOS and intent queries to AndroidManifest.xml for proper canLaunchUrl and launch behavior.
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
final Uri _url = Uri.parse('https://flutter.dev');
void main() => runApp(
const MaterialApp(
home: Material(
child: Center(
child: ElevatedButton(onPressed: _launchUrl, child: Text('Show Flutter homepage')),
),
),
),
);
Future<void> _launchUrl() async {
if (!await launchUrl(_url)) {
throw Exception('Could not launch $_url');
}
}Alternatives
Packages that do the same job and could replace url_launcher.
- app_settings
Open iOS and Android phone settings pages from a Flutter app.
89Compare - mailto
Create mailto URIs with support for multiple to, cc, bcc, subject, and body fields with encoding.
50Compare
Works with
Packages commonly used together with url_launcher: ones it builds on, ones built on it, and its own family.
- url_launcher_androidurl_launcher depends on itAndroid implementation of the url_launcher plugin for launching URLs.
- url_launcher_windowsurl_launcher depends on itLaunch URLs, files and app schemes on Windows from Flutter apps.
- url_launcher_iosurl_launcher depends on itiOS implementation of the url_launcher plugin for launching URLs on iOS devices.
- supabase_flutterBuilt on url_launcherFlutter client for Supabase providing auth, database, realtime, storage and edge functions.
- pdfrxBuilt on url_launcherFast, cross‑platform PDF viewer and editor widget for Flutter apps.
- flutter_web_auth_2Built on url_launcherFlutter plugin for authenticating a user with a web service.
- widgetbookBuilt on url_launcherA sandbox for building and testing Flutter widgets and screens in isolation.
- flutter_quillBuilt on url_launcherA rich text WYSIWYG editor component and toolbar for Flutter apps.