Platforms and setup
Native platforms: ios, android.
Public actions
LinkedIn.open
factory LinkedIn.open({final bool fallbackToStore = false})
Launch with DeeplinkX.launchApp. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
fallbackToStore | bool | No | false |
LinkedIn.openProfile
static LinkedInOpenProfileAction openProfile({ required final String profileId, final bool fallbackToStore = false, })
Launch with DeeplinkX.launchAction. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
profileId | String | Yes | — |
fallbackToStore | bool | No | false |
LinkedIn.openCompany
static LinkedInOpenCompanyAction openCompany({ required final String companyId, final bool fallbackToStore = false, })
Launch with DeeplinkX.launchAction. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.
| Parameter | Type | Required | Default |
|---|---|---|---|
companyId | String | Yes | — |
fallbackToStore | bool | No | false |
Provider setup and examples
DeeplinkX provides support for LinkedIn deep linking actions.
Available Actions
Launch LinkedIn App
final deeplinkX = DeeplinkX();
// Simple launch
await deeplinkX.launchApp(LinkedIn.open());
// Launch with store fallback if not installed
await deeplinkX.launchApp(LinkedIn.open(fallbackToStore: true));
// Launch with fallback disabled
await deeplinkX.launchApp(LinkedIn.open(), disableFallback: true);
Launch Profile Action
final deeplinkX = DeeplinkX();
// Simple action
await deeplinkX.launchAction(LinkedIn.openProfile(
profileId: 'johndoe',
));
// Action with store fallback if not installed
await deeplinkX.launchAction(
LinkedIn.openProfile(
profileId: 'johndoe',
fallbackToStore: true,
),
);
// Action with fallback disabled
await deeplinkX.launchAction(
LinkedIn.openProfile(
profileId: 'johndoe',
),
disableFallback: true,
);
Launch Company Page Action
final deeplinkX = DeeplinkX();
// Simple action
await deeplinkX.launchAction(LinkedIn.openCompany(
companyId: 'company-id',
));
// Action with store fallback if not installed
await deeplinkX.launchAction(
LinkedIn.openCompany(
companyId: 'company-id',
fallbackToStore: true,
),
);
// Action with fallback disabled
await deeplinkX.launchAction(
LinkedIn.openCompany(
companyId: 'company-id',
),
disableFallback: true,
);
Parameter Validations
Profile ID and Company ID Validation
LinkedIn profile IDs and company IDs should be valid identifiers as used by LinkedIn.
Example valid profile IDs:
johndoejane-smith-123456789
Platform-Specific Configuration
iOS
Add the following to your ios/Runner/Info.plist:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>linkedin</string>
<string>itms-apps</string>
</array>
Android
Add the following to your android/app/src/main/AndroidManifest.xml inside the <queries> tag:
<queries>
<!-- For LinkedIn app -->
<package android:name="com.linkedin.android" />
<!-- For Play Store fallback (if using fallbackToStore) -->
<package android:name="com.android.vending" />
<!-- For web fallback (required for universal links) -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
URL Schemes
DeeplinkX uses the following URL schemes for LinkedIn:
Native App Deep Links
When LinkedIn is installed, the following scheme is used:
linkedin://- Native LinkedIn URL scheme
Web Fallback URLs
When LinkedIn is not installed, DeeplinkX automatically falls back to:
https://www.linkedin.com- Official LinkedIn web URL
Supported Fallback Stores
When the LinkedIn app is not installed, DeeplinkX can redirect users to download LinkedIn from the following app stores:
- iOS App Store
- Google Play Store
- Microsoft Store
To enable fallback to app stores, use the fallbackToStore parameter:
final deeplinkX = DeeplinkX();
await deeplinkX.launchApp(LinkedIn.open(fallbackToStore: true));
Fallback Behavior
LinkedIn uses universal links, which work seamlessly across platforms:
- First, it attempts to open the LinkedIn app if it's installed on the device using universal links.
- If the LinkedIn app is not installed and
fallbackToStoreis set totrue, it will redirect to the appropriate app store based on the user's platform (iOS App Store, Google Play Store, or Microsoft Store). - If no supported store is available for the current platform or the store app cannot be launched, it will automatically fall back to opening the URL in a web browser, as LinkedIn uses universal links.
- You can disable all fallbacks by setting
disableFallback: truein the launch methods.
Fallback Support for Actions
| Action | Store Fallback | Web Fallback |
|---|---|---|
| open | ✅ | ✅ |
| openProfile | ✅ | ✅ |
| openCompany | ✅ | ✅ |
Check If LinkedIn Is Installed
final deeplinkX = DeeplinkX();
final isInstalled = await deeplinkX.isAppInstalled(LinkedIn());