Platforms and setup
Native platforms: ios, android.
Public actions
Pinterest.open
factory Pinterest.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 |
Pinterest.openProfile
static PinterestOpenProfileAction openProfile({ required final String username, 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 |
|---|---|---|---|
username | String | Yes | — |
fallbackToStore | bool | No | false |
Pinterest.openPin
static PinterestOpenPinAction openPin({ required final String pinId, 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 |
|---|---|---|---|
pinId | String | Yes | — |
fallbackToStore | bool | No | false |
Pinterest.search
static PinterestSearchAction search({ required final String query, 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 |
|---|---|---|---|
query | String | Yes | — |
fallbackToStore | bool | No | false |
Pinterest.openBoard
static PinterestOpenBoardAction openBoard({ required final String username, required final String board, 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 |
|---|---|---|---|
username | String | Yes | — |
board | String | Yes | — |
fallbackToStore | bool | No | false |
Provider setup and examples
DeeplinkX provides comprehensive support for Pinterest deep linking actions.
Basic Usage
Launch Pinterest App
To simply open the Pinterest app:
await deeplinkX.launchApp(Pinterest.open());
With fallback to app store:
await deeplinkX.launchApp(Pinterest.open(fallbackToStore: true));
Without fallback:
await deeplinkX.launchApp(Pinterest.open(), disableFallback: true);
Open Profile
To open a specific Pinterest profile:
await deeplinkX.launchAction(Pinterest.openProfile(username: 'pinterest')); // Pinterest username
With fallback to app store:
await deeplinkX.launchAction(Pinterest.openProfile(
username: 'pinterest', // Pinterest username
fallbackToStore: true,
));
Without fallback:
await deeplinkX.launchAction(
Pinterest.openProfile(username: 'pinterest'), // Pinterest username
disableFallback: true,
);
Open Pin
To open a specific Pinterest pin:
await deeplinkX.launchAction(Pinterest.openPin(pinId: '1234567890')); // Pinterest pin ID
With fallback to app store:
await deeplinkX.launchAction(Pinterest.openPin(
pinId: '1234567890', // Pinterest pin ID
fallbackToStore: true,
));
Without fallback:
await deeplinkX.launchAction(
Pinterest.openPin(pinId: '1234567890'), // Pinterest pin ID
disableFallback: true,
);
Search
To search on Pinterest:
await deeplinkX.launchAction(Pinterest.search(query: 'flutter')); // Search query
With fallback to app store:
await deeplinkX.launchAction(Pinterest.search(
query: 'flutter', // Search query
fallbackToStore: true,
));
Without fallback:
await deeplinkX.launchAction(
Pinterest.search(query: 'flutter'), // Search query
disableFallback: true,
);
Open Board
To open a specific Pinterest board:
await deeplinkX.launchAction(Pinterest.openBoard(
username: 'pinterest', // Board owner username
board: 'my-board', // Board (lower-case, hyphenated)
));
With fallback to app store:
await deeplinkX.launchAction(Pinterest.openBoard(
username: 'pinterest',
board: 'my-board',
fallbackToStore: true,
));
Without fallback:
await deeplinkX.launchAction(
Pinterest.openBoard(username: 'pinterest', board: 'my-board'),
disableFallback: true,
);
Platform Configuration
iOS
Add the following to your Info.plist:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>pinterest</string>
</array>
Android
Add the following to your AndroidManifest.xml:
<queries>
<!-- For Pinterest app -->
<package android:name="com.pinterest" />
</queries>
URL Schemes
DeeplinkX uses the following URL schemes for Pinterest:
Native App
When Pinterest is installed, the following scheme is used:
pinterest://- Native Pinterest URL scheme- For profiles:
pinterest://user/{username} - For pins:
pinterest://pin/{pinId} - For search:
pinterest://search/pins?q={query} - For boards:
pinterest://board/<USER>/<BOARD>
Web Fallback
When Pinterest is not installed, DeeplinkX automatically falls back to:
https://www.pinterest.com- Official Pinterest web URL- For profiles:
https://www.pinterest.com/{username} - For pins:
https://www.pinterest.com/pin/{pinId} - For search:
https://www.pinterest.com/search/pins?q={query} - For boards:
https://www.pinterest.com/<USER>/<BOARD>
App Store Fallback
When the Pinterest app is not installed, DeeplinkX can redirect users to download Pinterest from the following app stores:
await deeplinkX.launchApp(Pinterest.open(fallbackToStore: true));
Fallback Behavior
DeeplinkX follows this sequence when handling Pinterest deeplinks:
- First, it attempts to launch the Pinterest app if it's installed on the device.
- If the Pinterest 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 or Google Play Store). - If no supported store is available for the current platform or the store app cannot be launched, it will fall back to opening the Pinterest web interface in the default browser.
- You can disable all fallbacks by setting
disableFallback: truein the launch methods.
Check If Pinterest Is Installed
final deeplinkX = DeeplinkX();
final isInstalled = await deeplinkX.isAppInstalled(Pinterest());