SDK / FLUTTER

Deep linking for Flutter apps.

Initialize the Flutter SDK once, then resolve Universal Links and Android App Links into a destination and payload your app can route.

Package

wilderlinks_flutter_sdk

1.0.10

01 / Install

Add the SDK

Terminalshell
flutter pub add wilderlinks_flutter_sdk:^1.0.10

02 / Configure

Initialize once

Use the WilderLinks API base URL and add the exact link host configured for your app. Replace links.example.com with that host.

main.dartdart
import 'package:wilderlinks_flutter_sdk/wilderlinks_flutter_sdk.dart';

void configureLinks() {
  WilderlinksSdk.init(const WilderlinksConfig(
    baseUrl: 'https://api.wilderlinks.space',
    domains: ['links.example.com'],
  ));
}

04 / Deferred matching

Match only tokens your app can access

deferred_match.dartdart
import 'package:wilderlinks_flutter_sdk/wilderlinks_flutter_sdk.dart';

Future<void> checkClipboardFallback() async {
  final result = await WilderlinksSdk.checkDeferredInstall();
  if (result.matched) {
    print(result.deepLinkPayload);
  }
}

  • checkDeferredInstall() reads a clipboard token. It is a fallback, not a guaranteed install-referrer channel.
  • matchDeferredToken(baseUrl, token) and matchInstallAttributionToken(baseUrl, token, provider: ...) exchange tokens your app already obtained.
  • The SDK does not recover a token automatically from the iOS App Store.

05 / Platform setup

Before testing on a device

  • The package declares Dart >=3.0.0 and Flutter >=3.10.0.
  • Call configureLinks() before resolving or matching links. Replace the example hostname with a domain configured for your app.
  • WilderlinksListener handles the initial app link, listens for links while the app is running, and checks deferred clipboard matching when no initial link is present. Dispose it with its owning lifecycle.
  • The Flutter package does not expose Play Install Referrer directly. For Android install attribution, bridge the native referrer token into your app and pass it to matchDeferredToken(baseUrl, token).

Configure the native OS association as well as the SDK. Replace YOUR_LINK_DOMAIN and YOUR_PATH_PREFIX with the exact verified host and path prefix from the app profile in your WilderLinks workspace.

AndroidManifest.xmlxml
<uses-permission android:name="android.permission.INTERNET" />

<activity android:name=".MainActivity" android:exported="true">
  <meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
  <intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="https" android:host="YOUR_LINK_DOMAIN" android:pathPrefix="/YOUR_PATH_PREFIX/" />
  </intent-filter>
</activity>

iOS · Runner.entitlementsxml
<key>com.apple.developer.associated-domains</key>
<array>
  <string>applinks:YOUR_LINK_DOMAIN</string>
</array>

In Xcode, enable the Associated Domains capability and use the same host. In the WilderLinks app profile, configure the Android package name and signing SHA-256 fingerprint, or the iOS bundle ID and Apple Team ID. The matching Android Digital Asset Links and Apple App Site Association files must be available for the host; SDK initialization alone does not establish domain verification.

06 / Security

Keep private credentials server-side

Do not ship organization or private API keys in mobile apps, browser JavaScript, or Unity client builds. Client-side link resolution and authenticated link-management operations have different trust boundaries; keep API-key operations in a trusted server environment.

To create a link in response to an action in your Flutter app, send the link details to an endpoint in your own backend using your app’s normal user authentication. That backend must verify the user is allowed to create the link, then call WilderLinks (for example, POST /api/v1/links) with the organization API key held only on the server.

  1. Your app sends the requested destination and link settings to your backend.
  2. Your backend authenticates and authorizes the user, then creates the WilderLinks link.
  3. Your backend returns the generated URL; the app shares or displays it using its platform-appropriate UI.

The Flutter SDK’s createDeepLink requires the organization API key. Do not call it with that secret from a distributed app.

These SDKs do not provide your app’s authenticated link-creation backend endpoint; implement that endpoint in your own backend.

07 / Troubleshooting

When a link does not match

  • A configuration StateError means WilderlinksSdk.init(...) was not called before the operation.
  • A non-matching result can mean the incoming host is not in domains, the URL has no slug, or no route matched. Inspect matched and error.
  • Ensure the OS delivers the domain as an App Link or Universal Link; the SDK package does not configure domain association for the app.

Continue building