Skip to content
pubscout

url_launcher

6.3.3, released 7 weeks ago by flutter.dev

Flutter plugin for launching URLs across mobile, desktop, and web platforms.

Flutter FavoriteWASM-readyRock solid
$ flutter pub add url_launcher
Source repository

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.

  • mailto

    Create mailto URIs with support for multiple to, cc, bcc, subject, and body fields with encoding.

Works with

Packages commonly used together with url_launcher: ones it builds on, ones built on it, and its own family.