DeeplinkX
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 and apps including Facebook, Instagram, LinkedIn, WhatsApp, and Telegram
Usage
First, import the package and create an instance:
import 'package:deeplink_x/deeplink_x.dart';
void main() {
final deeplinkX = DeeplinkX();
// Use the methods below
}
Launch App Actions
Execute specific actions within apps:
// Basic usage
final isActionLaunched = await deeplinkX.launchAction(Telegram.openProfile('username'));
// With store fallback (redirects to store if app not installed)
deeplinkX.launchAction(Telegram.openProfile('username', fallBackToStore: true));
// Disable all fallbacks
deeplinkX.launchAction(Telegram.openProfile('username'), disableFallback: true);
Launch Apps
Simply open apps without specific actions:
// Basic usage
final isLaunched = await deeplinkX.launchApp(Instagram.open());
// With store fallback
deeplinkX.launchApp(Instagram.open(fallBackToStore: true));
// Disable all fallbacks
deeplinkX.launchApp(Instagram.open(), disableFallback: true);
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 | • Open profile by username | |
Social Apps | • Chat with phone number • Share text content |
|
Social Apps | • Open profile by ID • Open profile by username • Open page • Open group • Open event |
|
Business | • Open profile page • Open company page |
Documentation
Detailed documentation available in doc/apps:
- iOS App Store
- Mac App Store
- Microsoft Store
- Play Store
- Huawei AppGalley Store
- Cafe Bazaar Store
- Myket Store
- Telegram
URL Scheme Handling
DeeplinkX uses a three-tier approach for compatibility:
- Native App Deep Links: Direct app launch when installed
- Store Fallback: Redirects to app stores when apps aren't installed (with
fallBackToStore: true
) - Web Fallback: Redirects to web URLs when neither app nor store is available
Most app actions (like opening profiles, sending messages) support all three fallback levels:
// With store fallback enabled
await deeplinkX.launchAction(Instagram.open(fallBackToStore: true));
// With fallback disabled
await deeplinkX.launchAction(Instagram.open(), disableFallback: true);
For detailed URL schemes and fallback behavior, see each app's documentation.
Platform-Specific Configuration
See respective app documentation for platform-specific configuration.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - 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.
Libraries
- deeplink_x
- A cross-platform deeplink plugin that supports various apps and platforms.