deeplink_x 1.1.2+1 copy "deeplink_x: ^1.1.2+1" to clipboard
deeplink_x: ^1.1.2+1 copied to clipboard

Easy to use Flutter plugin for type-safe external deeplink launching with built-in smart fallback, supporting app stores and popular apps.

DeeplinkX #

pub package Coverage Status License: MIT GitHub Issues GitHub Stars Platform

DeeplinkX Logo

Easy to use Flutter plugin for type-safe handling of external deeplinks with built-in support for popular apps. Features smart fallback to app stores and web URLs across all major platforms.

Naming Note: 'X' in DeeplinkX stands for external.

Features #

  • Launch deeplink actions within apps
  • Launch apps without specific actions
  • Redirect to app stores to update apps
  • Check if external app is installed on the device
  • Smart fallback system
  • Support popular stores including Google PlayStore, iOS AppStore, Mac AppStore, Microsoft Store, Huawei AppGallery, Myket, Cafe Bazaar
  • Support popular apps including Facebook, Instagram, LinkedIn, WhatsApp, Telegram, Twitter, YouTube, TikTok, Pinterest, Zoom, Slack, and Google Maps

Demo #

Try the live demo: https://deeplinkx.github.io/DeeplinkX/

Note: For better results test on mobile device.

Usage #

First, import the package and create an instance:

import 'package:deeplink_x/deeplink_x.dart';

void main() {
  final deeplinkX = DeeplinkX();
}

App and Platform Configuration #

Configure app-specific URLs for each platform:

  • iOS: Info.plist
  • Android: AndroidManifest.xml
  • MacOS: Info.plist

Check out Documentation section

Launch App Actions #

Execute a deeplink action and optionally fall back to the store if the app isn't installed:

final launched = await deeplinkX.launchAction(
  Telegram.openProfile('username', fallBackToStore: true),
);
// Set `disableFallback: true` to suppress store and web fallbacks.

Launch Apps #

Open an app without specifying an action:

final launched = await deeplinkX.launchApp(
  Instagram.open(fallBackToStore: true),
);
// Use `disableFallback: true` to skip store and web fallbacks.

Check If App Is Installed #

Verify if a specific app is installed on the device:

final isInstalled = await deeplinkX.isAppInstalled(LinkedIn());

Redirect To Store #

Redirect users to appropriate app stores based on their platform:

// Redirect to appropriate store based on current platform
final isRedirected = await deeplinkX.redirectToStore(
  storeActions: [
    AppStore.openAppPage(appId: '389801252'),  // iOS App Store
    PlayStore.openAppPage(packageName: 'com.instagram.android'),  // Google Play Store
    HuaweiAppGalleryStore.openAppPage(appId: 'C101162369'),  // Huawei AppGallery Store
  ],
);

Supported Apps And Actions #

Category App Supported Actions
Stores iOS App Store • Open app page
• Rate app
Stores Mac App Store • Open app page
• Rate app
Stores Microsoft Store • Open app page
• Rate app
Stores Google Play Store • Open app page
Stores Huawei AppGallery Store • Open app page
Stores Cafe Bazaar Store • Open app page
Stores Myket Store • Open app page
• Rate app
Social Apps Telegram • Open profile by username/phone
• Send message
Social Apps Instagram • Open profile by username
Social Apps WhatsApp • Chat with phone number
• Share text content
Social Apps Facebook • Open profile by ID
• Open profile by username
• Open page
• Open group
• Open event
Social Apps YouTube • Open video
• Open channel
• Open playlist
• Search
Social Apps Twitter • Open profile by username
• Open tweet by ID
• Search
Social Apps Pinterest • Open profile by username
• Open board by ID
• Search
Social Apps TikTok • Open profile by username
• Open video
• Open Tag
Social Apps Zoom • Join meeting by ID
Social Apps Slack • Open team
• Open channel
• Open user
Navigation Google Maps • View map
• Search location
• Directions
• Directions with coordinates
Business LinkedIn • Open profile page
• Open company page

Documentation #

Detailed documentation available in doc/apps:

URL Scheme Handling #

DeeplinkX uses a three-tier approach for compatibility:

  1. Native App Deep Links: Direct app launch when installed
  2. Store Fallback: Redirects to app stores when apps aren't installed (with fallBackToStore: true)
  3. Web Fallback: Redirects to web URLs when neither app nor store is available

Most actions support store or web fallbacks when the target app is missing:

await deeplinkX.launchAction(
  Instagram.open(fallBackToStore: true),
);
// Pass `disableFallback: true` to prevent store and web redirects.

For detailed URL schemes and fallback behavior, see each app's documentation.

  • Better User Experience: Custom schemes and app links trigger the app directly, so users don’t see a browser flash or an extra redirect before the app opens. This results in a smoother, more native-feeling experience.
  • No More Selection Dialogs: By using custom schemes and Android intents, the app launches directly without showing the "Open with..." dialog, reducing friction and confusion for users.
  • Safer with Fallbacks: You can reliably check if an app is installed using custom schemes or package names. If the app isn’t present, DeeplinkX can automatically fall back to the appropriate store or web URL.
  • Resilient to Changes: Custom schemes are often unofficial and may change or be removed by the app vendor. DeeplinkX always provides a fallback URL (usually a universal link), so even if the custom scheme changes, users are still redirected to the correct destination.

    Note: If you enable fallBackToStore: true and the custom scheme is changed or deleted (not usually happens), DeeplinkX will redirect users to the app store instead of the fallback web URL. This may interrupt the intended fallback-to-web experience. If you want users to always reach the web fallback when the app is missing or the scheme is invalid, set fallBackToStore: false.

  • Best of Both Worlds: DeeplinkX combines the speed and directness of custom schemes with the reliability of universal links as a fallback, ensuring your users always reach the intended content in the best way possible.

Why use DeeplinkX over url_launcher? #

  • Automatic Fallbacks: DeeplinkX can check if an app is installed and automatically fall back to the app store or a web URL if the app is missing. With url_launcher, you must handle this logic manually.
  • Custom Android Intents: DeeplinkX uses advanced Android intent options, url_launcher only supports basic intent launching.
  • Cross-Platform Consistency: DeeplinkX works seamlessly across platform, where url_launcher may not support certain schemes (e.g., checking can launch deep link of custom schemes on macOS).
  • Unified API for Many Apps: DeeplinkX provides a unified, high-level API for dozens of popular apps and stores, so you don't have to research and maintain deep link formats or intent structures yourself.
  • Less Boilerplate: With DeeplinkX, you can trigger complex actions (like opening a specific screen in an app, or falling back to the store) with a single method call, instead of writing custom logic for each case.

Platform-Specific Configuration #

See respective app documentation for platform-specific configuration.

Contributing #

Contributions are welcome! Please feel free to submit a Pull Request:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Issues and Feature Requests #

Have a bug or feature request? Please open a new issue after checking existing ones.