DeeplinkX
A lightweight 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
- Easy to use
- Type-safe API for external deeplinks
- Multi-platform support
- Smart fallback system
- No native platform codes
Usage
import 'package:deeplink_x/deeplink_x.dart';
void main() {
final deeplinkX = DeeplinkX();
// Launch App Actions
final isActionLaunched = await deeplinkX.launchAction(Telegram.openProfile('username'));
deeplinkX.launchAction(Telegram.openProfile('username', fallBackToStore: true));
deeplinkX.launchAction(Telegram.openProfile('username'), disableFallback: true);
// Launch Apps
final isLaunched = await deeplinkX.launchApp(Instagram.open());
deeplinkX.launchApp(Instagram.open(fallBackToStore: true));
deeplinkX.launchApp(Instagram.open(), disableFallback: true);
// Check App Is Installed
final isInstalled = await deeplinkX.isAppInstalled(LinkedIn());
// Redirect to store (Update app use case)
// Redirect to appropriate store based on 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 | • Launch app • Open app page • Rate app |
Stores | Mac App Store | • Launch app • Open app page • Rate app |
Stores | Microsoft Store | • Launch app • Open app page • Rate app |
Stores | Google Play Store | • Launch app • Open app page |
Stores | Huawei AppGallery Store | • Launch app • Open app page |
Stores | Cafe Bazaar Store | • Launch app • Open app page |
Stores | Myket Store | • Launch app • Open app page • Rate app |
Social Apps | Telegram | • Launch app • Open profile by username/phone • Send message |
Social Apps | • Launch app • Open profile by username |
|
Social Apps | • Launch app • Chat with phone number • Share text content |
|
Business | • Launch app • 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.