Viewing version 2.0.0. Open the latest package page.

app_links

2.0.0

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.

Download archive

Readme

app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler.

This plugin allows you to:

  • catch HTTPS URLs to open your app instead of the browser (App Link / Universal Link).
  • catch custom schemes to open your app (Deep Link / Custom URL scheme).

Getting Started

Before using the plugin, you'll need to setup each platforms you target.

Android

iOs

AppLinks

final _appLinks = AppLinks(
    // Called when a new uri has been redirected to the app
    onAppLink: (Uri uri) {
        // Do something (navigation, ...)
    },
);

// Get the initial/first link.
// This is also useful when app was terminated (i.e. not started)
final uri = await _appLinks.getInitialAppLink();

...

// Maybe later. Get the latest link.
final uri = await _appLinks.getLatestAppLink();

Android notes:

  • Intent action is filtered by Intent.ACTION_VIEW.

  • By default, flutter Activity is set with android:launchMode="singleTop". This is perfectly fine and expected, but this launches another instance of your app, specifically for the requested view.
    If you don't want this behaviour, you can set android:launchMode="singleInstance" in your AndroidManifest.xml and avoid another flutter warmup.

Tests

The following commands will help you to test links.

Android

adb shell am start
    -W -a android.intent.action.VIEW
    -d "<URI>" <PACKAGE>

For App Links, you can also test it from Android Studio: Documentation.

iOs

/usr/bin/xcrun simctl openurl booted "<URI>"
Changelog

2.0.0

  • Add null safety support.

1.0.0

  • Same as 0.2.0.
  • No known issue. Bumping to 1.0 to be prepared for null safety version.

0.2.0

  • Add configurations in example.

0.1.0+2

  • Update README.md.

0.1.0+1

  • Add documentation.
  • Format dart source code.

0.1.0

  • Initial release.
  • Android App Links, Deep Links, iOs Universal Links and Custom URL schemes.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'app_links:2.0.0'
pubspec.yaml
name: app_links
description: Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
version: 2.0.0
homepage: https://github.com/llfbandit/app_links

environment:
  sdk: ">=2.12.0 <3.0.0"
  flutter: ">=2.0.0"

dependencies:
  flutter:
    sdk: flutter

dev_dependencies:
  flutter_test:
    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:
  # This section identifies this Flutter project as a plugin project.
  # The 'pluginClass' and Android 'package' identifiers should not ordinarily
  # be modified. They are used by the tooling to maintain consistency when
  # adding or updating assets for this project.
  plugin:
    platforms:
      android:
        package: com.llfbandit.app_links
        pluginClass: AppLinksPlugin
      ios:
        pluginClass: AppLinksPlugin

  # To add assets to your plugin package, add an assets section, like this:
  # assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg
  #
  # For details regarding assets in packages, see
  # https://flutter.dev/assets-and-images/#from-packages
  #
  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # To add custom fonts to your plugin package, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts in packages, see
  # https://flutter.dev/custom-fonts/#from-packages

Version history

VersionPublishedArchiveSHA-256
0.1.0Cached · Upstream SHA-256 matchedDownload07891d9d…8285a8
0.1.0+1Cached · Upstream SHA-256 matchedDownload86542ee4…50d501
0.1.0+2Cached · Upstream SHA-256 matchedDownload2ec3d04c…2af9d4
0.2.0Cached · Upstream SHA-256 matchedDownloadbecd0893…97c3d0
1.0.0Cached · Upstream SHA-256 matchedDownload2c0b508b…c91682
2.0.0Cached · Upstream SHA-256 matchedDownloada3bc0cfb…9a8176
2.0.0+1Cached · Upstream SHA-256 matchedDownloadcf0bb213…342014
2.1.0Cached · Upstream SHA-256 matchedDownload8952ce08…a65c01
2.2.0Cached · Upstream SHA-256 matchedDownload02d5b116…dd18f7
2.2.1Cached · Upstream SHA-256 matchedDownload4af01185…c78234
2.2.2Cached · Upstream SHA-256 matchedDownloadde064ea9…db2f1c
3.0.0Cached · Upstream SHA-256 matchedDownloadfcf08826…f3bb35
3.0.1Cached · Upstream SHA-256 matchedDownloadbbe434aa…d35163
3.0.2Cached · Upstream SHA-256 matchedDownload24feda5b…787688
3.1.0Cached · Upstream SHA-256 matchedDownload7a28970b…8db7f2
3.2.0Cached · Upstream SHA-256 matchedDownloadcbf1dbb4…33ecfe
3.3.0Cached · Upstream SHA-256 matchedDownloadd1b2cf9a…e36a0d
3.4.0Cached · Upstream SHA-256 matchedDownloada669e117…da4df2
3.4.1Cached · Upstream SHA-256 matchedDownload0ae67296…0d1e8e
3.4.2Cached · Upstream SHA-256 matchedDownloadd572dcdf…c1b5e8
3.4.3Cached · Upstream SHA-256 matchedDownload16725e71…6a4cb6
3.4.4Cached · Upstream SHA-256 matchedDownloadf41abc50…80abd5
3.4.5Cached · Upstream SHA-256 matchedDownloadeb83c2b1…ef0dae
3.5.0-beta.1Cached · Upstream SHA-256 matchedDownloadb577f5af…703122
3.5.0-beta.2Cached · Upstream SHA-256 matchedDownload6604788c…0ac535
3.5.0-beta.3Cached · Upstream SHA-256 matchedDownload1e1e917e…e5cef8
3.5.0Cached · Upstream SHA-256 matchedDownload4e392b5e…74a3bb
3.5.1Cached · Upstream SHA-256 matchedDownload3ced568a…0cada4
4.0.0Cached · Upstream SHA-256 matchedDownloadfd7fc156…88bb5f
4.0.1Cached · Upstream SHA-256 matchedDownload42dc15ae…08c815
5.0.0Cached · Upstream SHA-256 matchedDownload0fd41f05…eeb121
6.0.0Cached · Upstream SHA-256 matchedDownloadf57cf388…ca3a9f
6.0.1Cached · Upstream SHA-256 matchedDownload1c2b9e9c…53d001
6.0.2Cached · Upstream SHA-256 matchedDownload8c6ef5ba…e736c9
6.1.0Cached · Upstream SHA-256 matchedDownloadc7b2c446…9a0cc1
6.1.1Cached · Upstream SHA-256 matchedDownload96e67781…5eb3db
6.1.2Cached · Upstream SHA-256 matchedDownload49117eef…9e7a14
6.1.3Cached · Upstream SHA-256 matchedDownloada9905d6a…c4f06b
6.1.4Cached · Upstream SHA-256 matchedDownloadae5f9a1b…70c4af
6.2.0Cached · Upstream SHA-256 matchedDownload4acba851…ceb0c7
6.2.1Cached · Upstream SHA-256 matchedDownloadf04c3ca9…305e21
6.3.0Cached · Upstream SHA-256 matchedDownload50437e59…e1c5ea
6.3.1Cached · Upstream SHA-256 matchedDownload7e058edb…93a491
6.3.2Cached · Upstream SHA-256 matchedDownloadad1a6d59…84dd99
6.3.3Cached · Upstream SHA-256 matchedDownload433df2e6…be7950
6.4.0Cached · Upstream SHA-256 matchedDownload85ed8fc1…bb54ba
6.4.1Cached · Upstream SHA-256 matchedDownload5f884475…cee3e8
7.0.0Cached · Upstream SHA-256 matchedDownload3462d9de…8a7abc
7.1.0Cached · Upstream SHA-256 matchedDownloada408901c…7a4e4f
7.1.1Cached · Upstream SHA-256 matchedDownloada350a5b3…483c18
7.1.2Cached · Upstream SHA-256 matchedDownload4ec328cd…7f1315
7.2.0Cached · Upstream SHA-256 matchedDownload9d3c82f6…780dbe
7.2.1Cached · Upstream SHA-256 matchedDownloadf8db46d2…1188ea
7.2.2Cached · Upstream SHA-256 matchedDownload08ba88bf…bc69c3

Dependencies

flutter { "sdk": "flutter" }